From 7f4212baabadec9e4ce431bdb528fb091aa36258 Mon Sep 17 00:00:00 2001 From: Tsutomu Katsube Date: Mon, 9 Sep 2024 08:56:39 +0900 Subject: [PATCH] postal-code-japan: suppress "literal string will be frozen in the future" warning (#227) Before change: ```console $ ruby test/run-test.rb -t PostalCodeJapanTest 2>&1 | grep red-datasets /Users/zzz/src/github.com/red-data-tools/red-datasets/lib/datasets/postal-code-japan.rb:45: warning: literal string will be frozen in the future ``` After change: ```console $ ruby test/run-test.rb -t PostalCodeJapanTest 2>&1 | grep red-datasets ``` --- lib/datasets/postal-code-japan.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/datasets/postal-code-japan.rb b/lib/datasets/postal-code-japan.rb index 3152e3e..8bb7e81 100644 --- a/lib/datasets/postal-code-japan.rb +++ b/lib/datasets/postal-code-japan.rb @@ -41,7 +41,7 @@ def initialize(reading: :lowercase) super() @reading = reading unless VALID_READINGS.include?(@reading) - message = ":reading must be one of [" + message = +":reading must be one of [" message << VALID_READINGS.collect(&:inspect).join(", ") message << "]: #{@reading.inspect}" raise ArgumentError, message