Skip to content

Commit

Permalink
Merge pull request #886 from yahonda/chilled_strings
Browse files Browse the repository at this point in the history
Address `warning: literal string will be frozen in the future`
  • Loading branch information
yahonda authored Oct 30, 2024
2 parents b19962a + 549fbcf commit 3178667
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion spec/base_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def hello
end

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

expect(capture(:stderr) { Barn.start(%w(paintz)) }).to eq(expected)
Expand Down
2 changes: 1 addition & 1 deletion spec/parser/options_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def remaining
create foo: "baz", bar: :required
parse("--bar", "baz", "--baz", "unknown")

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

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

0 comments on commit 3178667

Please sign in to comment.