Skip to content

Commit

Permalink
Avoid Ruby warnings "ambiguous first argument" (#881)
Browse files Browse the repository at this point in the history
- add parentheses to disambiguate
  • Loading branch information
olleolleolle committed Apr 5, 2020
1 parent 8f4f407 commit 3e7faa4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion spec/draper/collection_decorator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ module Draper
it "uses the custom class name" do
decorator = ProductsDecorator.new([])

expect(decorator.to_s).to match /ProductsDecorator/
expect(decorator.to_s).to match(/ProductsDecorator/)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/draper/decorator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ module Draper
it "returns a detailed description of the decorator" do
decorator = ProductDecorator.new(double)

expect(decorator.inspect).to match /#<ProductDecorator:0x\h+ .+>/
expect(decorator.inspect).to match(/#<ProductDecorator:0x\h+ .+>/)
end

it "includes the object" do
Expand Down

0 comments on commit 3e7faa4

Please sign in to comment.