Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address warning: literal string will be frozen in the future #886

Merged
merged 1 commit into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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