Skip to content

Commit

Permalink
Fix new RuboCop offence
Browse files Browse the repository at this point in the history
`Style/RedundantInterpolationUnfreeze`. In Ruby >= 3.0, interpolated
strings are already unfrozen.

```
Comparison:
         "test #{1}":  8929208.6 i/s
        +"test #{1}":  7853049.9 i/s - 1.14x  (± 0.00) slower
```
  • Loading branch information
tagliala committed Sep 1, 2024
1 parent eb14b3e commit 93a7fdf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/chrono_model/time_machine/timeline.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def timeline(record = nil, options = {})
relation = relation.from("public.#{quoted_table_name}") unless chrono?
relation = relation.where(id: rid) if rid

sql = +"SELECT ts FROM ( #{relation.to_sql} ) AS foo WHERE ts IS NOT NULL"
sql = "SELECT ts FROM ( #{relation.to_sql} ) AS foo WHERE ts IS NOT NULL"

if options.key?(:before)
sql << " AND ts < '#{Conversions.time_to_utc_string(options[:before])}'"
Expand Down

0 comments on commit 93a7fdf

Please sign in to comment.