Skip to content

Commit 3178667

Browse files
authored
Merge pull request #886 from yahonda/chilled_strings
Address `warning: literal string will be frozen in the future`
2 parents b19962a + 549fbcf commit 3178667

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

spec/base_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ def hello
318318
end
319319

320320
it "suggests commands that are similar if there is a typo" do
321-
expected = "Could not find command \"paintz\" in \"barn\" namespace.\n"
321+
expected = "Could not find command \"paintz\" in \"barn\" namespace.\n".dup
322322
expected << "Did you mean? \"paint\"\n" if Thor::Correctable
323323

324324
expect(capture(:stderr) { Barn.start(%w(paintz)) }).to eq(expected)

spec/parser/options_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def remaining
117117
create foo: "baz", bar: :required
118118
parse("--bar", "baz", "--baz", "unknown")
119119

120-
expected = "Unknown switches \"--baz\""
120+
expected = "Unknown switches \"--baz\"".dup
121121
expected << "\nDid you mean? \"--bar\"" if Thor::Correctable
122122

123123
expect { check_unknown! }.to raise_error(Thor::UnknownArgumentError) do |error|

0 commit comments

Comments
 (0)