Skip to content

Commit

Permalink
japanese-date-parser: suppress "literal string will be frozen in the …
Browse files Browse the repository at this point in the history
…future" warning (#219)

Before change:

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

After change:

```console
$ ruby test/run-test.rb -t JapaneseDateParserTest 2>&1 | grep red-datasets
```
  • Loading branch information
tikkss authored Sep 6, 2024
1 parent 6ed8a8f commit 3e68596
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/datasets/japanese-date-parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def parse(string)
match_data = Regexp.last_match
era_initial = ERA_INITIALS[match_data[1]]
if era_initial.nil?
message = "era must be one of ["
message = +"era must be one of ["
message << ERA_INITIALS.keys.join(", ")
message << "]: #{match_data[1]}"
raise UnsupportedEraInitialRange, message
Expand Down

0 comments on commit 3e68596

Please sign in to comment.