Skip to content

Commit

Permalink
california-housing: suppress "literal string will be frozen in the fu…
Browse files Browse the repository at this point in the history
…ture" warning (#207)

Before change:

```console
$ ruby test/run-test.rb -t CaliforniaHousingTest 2>&1 | grep red-datasets
/Users/zzz/src/github.com/red-data-tools/red-datasets/lib/datasets/california-housing.rb:42:
warning: literal string will be frozen in the future
```

After change:

```console
$ ruby test/run-test.rb -t CaliforniaHousingTest 2>&1 | grep red-datasets
```
  • Loading branch information
tikkss authored Sep 2, 2024
1 parent 9e20d34 commit 778347c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/datasets/california-housing.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def each
file_name = "cadata.txt"
download(data_path, data_url)
open_data(data_path, file_name) do |input|
data = ""
data = +""
input.each_line do |line|
next unless line.start_with?(" ")
data << line.lstrip.gsub(/ +/, ",")
Expand Down

0 comments on commit 778347c

Please sign in to comment.