diff options
author | Benoit Daloze <[email protected]> | 2019-07-27 12:40:09 +0200 |
---|---|---|
committer | Benoit Daloze <[email protected]> | 2019-07-27 12:40:09 +0200 |
commit | 5c276e1cc91c5ab2a41fbf7827af2fed914a2bc0 (patch) | |
tree | 05b5c68c8b2a00224d4646ea3b26ce3877efaadd /spec/ruby/shared/string/times.rb | |
parent | a06301b103371b0b7da8eaca26ba744961769f99 (diff) |
Update to ruby/spec@875a09e
Diffstat (limited to 'spec/ruby/shared/string/times.rb')
-rw-r--r-- | spec/ruby/shared/string/times.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/ruby/shared/string/times.rb b/spec/ruby/shared/string/times.rb index e7b788d4f9..0baefd25b1 100644 --- a/spec/ruby/shared/string/times.rb +++ b/spec/ruby/shared/string/times.rb @@ -18,12 +18,12 @@ describe :string_times, shared: true do end it "raises an ArgumentError when given integer is negative" do - lambda { @object.call("cool", -3) }.should raise_error(ArgumentError) - lambda { @object.call("cool", -3.14) }.should raise_error(ArgumentError) + -> { @object.call("cool", -3) }.should raise_error(ArgumentError) + -> { @object.call("cool", -3.14) }.should raise_error(ArgumentError) end it "raises a RangeError when given integer is a Bignum" do - lambda { @object.call("cool", 999999999999999999999) }.should raise_error(RangeError) + -> { @object.call("cool", 999999999999999999999) }.should raise_error(RangeError) end it "returns subclass instances" do @@ -50,13 +50,13 @@ describe :string_times, shared: true do platform_is wordsize: 32 do it "raises an ArgumentError if the length of the resulting string doesn't fit into a long" do - lambda { @object.call("abc", (2 ** 31) - 1) }.should raise_error(ArgumentError) + -> { @object.call("abc", (2 ** 31) - 1) }.should raise_error(ArgumentError) end end platform_is wordsize: 64 do it "raises an ArgumentError if the length of the resulting string doesn't fit into a long" do - lambda { @object.call("abc", (2 ** 63) - 1) }.should raise_error(ArgumentError) + -> { @object.call("abc", (2 ** 63) - 1) }.should raise_error(ArgumentError) end end end |