1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
This commit is contained in:
Benoit Daloze 2019-09-29 16:03:58 +02:00
parent 31bb66a19d
commit 1c938a72aa
83 changed files with 1416 additions and 308 deletions

View file

@ -186,14 +186,6 @@ describe "A lambda literal -> () { }" do
@a.().should == {}
@a.(1, 2, 3, a: 4, b: 5).should == {a: 4, b: 5}
def self.suppress_keyword_warning(&block)
if RUBY_VERSION > '2.7'
suppress_warning(&block)
else
yield
end
end
suppress_keyword_warning do
h = mock("keyword splat")
h.should_receive(:to_hash).and_return({a: 1})
@ -530,14 +522,6 @@ describe "A lambda expression 'lambda { ... }'" do
@a.().should == {}
@a.(1, 2, 3, a: 4, b: 5).should == {a: 4, b: 5}
def self.suppress_keyword_warning(&block)
if RUBY_VERSION > '2.7'
suppress_warning(&block)
else
yield
end
end
suppress_keyword_warning do
h = mock("keyword splat")
h.should_receive(:to_hash).and_return({a: 1})