Skip to content

Commit a8fb2a7

Browse files
committed
Suppress duplicated keyword warning
1 parent ce73119 commit a8fb2a7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

spec/ruby/language/method_spec.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,9 @@ def m(**k) k end
596596
m(a: 1, b: 2).should == { a: 1, b: 2 }
597597
m(*[]).should == {}
598598
m(**{}).should == {}
599-
m(**{a: 1, b: 2}, **{a: 4, c: 7}).should == { a: 4, b: 2, c: 7 }
599+
suppress_warning {
600+
eval "m(**{a: 1, b: 2}, **{a: 4, c: 7})"
601+
}.should == { a: 4, b: 2, c: 7 }
600602
-> { m(2) }.should raise_error(ArgumentError)
601603
end
602604

0 commit comments

Comments
 (0)