Skip to content

Commit

Permalink
house-of-councillor: suppress "literal string will be frozen in the f…
Browse files Browse the repository at this point in the history
…uture" warning (#215)

Before change:

```console
$ ruby test/run-test.rb -t HouseOfCouncillorTest 2>&1 | grep red-datasets
/Users/zzz/src/github.com/red-data-tools/red-datasets/lib/datasets/house-of-councillor.rb:108: warning: literal string will be frozen in the future
/Users/zzz/src/github.com/red-data-tools/red-datasets/lib/datasets/house-of-councillor.rb:149: warning: literal string will be frozen in the future
/Users/zzz/src/github.com/red-data-tools/red-datasets/lib/datasets/house-of-councillor.rb:151: warning: literal string will be frozen in the future
/Users/zzz/src/github.com/red-data-tools/red-datasets/lib/datasets/house-of-councillor.rb:153: warning: literal string will be frozen in the future
/Users/zzz/src/github.com/red-data-tools/red-datasets/lib/datasets/house-of-councillor.rb:155: warning: literal string will be frozen in the future
```

After change:

```console
$ ruby test/run-test.rb -t HouseOfCouncillorTest 2>&1 | grep red-datasets
```
  • Loading branch information
tikkss authored Sep 5, 2024
1 parent f8c42e3 commit 23468fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/datasets/house-of-councillor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def initialize(type: :bill)
super()
@type = type
unless VALID_TYPES.include?(type)
message = ":type must be one of ["
message = +":type must be one of ["
message << VALID_TYPES.collect(&:inspect).join(", ")
message << "]: #{@type.inspect}"
raise ArgumentError, message
Expand Down Expand Up @@ -143,7 +143,7 @@ def each
private

def open_data
data_url = "https://smartnews-smri.github.io/house-of-councillors/data"
data_url = +"https://smartnews-smri.github.io/house-of-councillors/data"
case @type
when :bill
data_url << "/gian.csv"
Expand Down

0 comments on commit 23468fc

Please sign in to comment.