Skip to content

Commit

Permalink
diamonds, fuel-economy: suppress "literal string will be frozen in th…
Browse files Browse the repository at this point in the history
…e future" warning (#210)

Before change:

```console
$ ruby test/run-test.rb -t '/DiamondsTest|FuelEconomyTest/' 2>&1 | grep red-datasets
/Users/zzz/src/github.com/red-data-tools/red-datasets/lib/datasets/ggplot2-dataset.rb:49: warning: literal string will be frozen in the future
(repeated 29 times)
```

After change:

```console
$ ruby test/run-test.rb -t '/DiamondsTest|FuelEconomyTest/' 2>&1 | grep red-datasets
```
  • Loading branch information
tikkss authored Sep 3, 2024
1 parent f38bede commit e3bc43b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/datasets/ggplot2-dataset.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def fetch_description
data_r_url = "#{download_base_url}/R/#{data_r_base_name}"
download(data_r_path, data_r_url)
descriptions = {}
comment = ""
comment = +""
File.open(data_r_path) do |data_r|
data_r.each_line do |line|
case line.chomp
Expand All @@ -51,7 +51,7 @@ def fetch_description
when /\A"(.+)"\z/
name = Regexp.last_match[1]
descriptions[name] = parse_roxygen(comment.rstrip)
comment = ""
comment = +""
end
end
descriptions[@ggplot2_dataset_name]
Expand Down

0 comments on commit e3bc43b

Please sign in to comment.