diff options
author | Benoit Daloze <eregontp@gmail.com> | 2019-07-27 12:40:09 +0200 |
---|---|---|
committer | Benoit Daloze <eregontp@gmail.com> | 2019-07-27 12:40:09 +0200 |
commit | 5c276e1cc91c5ab2a41fbf7827af2fed914a2bc0 (patch) | |
tree | 05b5c68c8b2a00224d4646ea3b26ce3877efaadd /spec/ruby/core/array/multiply_spec.rb | |
parent | a06301b103371b0b7da8eaca26ba744961769f99 (diff) | |
download | ruby-5c276e1cc91c5ab2a41fbf7827af2fed914a2bc0.tar.gz |
Update to ruby/spec@875a09e
Diffstat (limited to 'spec/ruby/core/array/multiply_spec.rb')
-rw-r--r-- | spec/ruby/core/array/multiply_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/ruby/core/array/multiply_spec.rb b/spec/ruby/core/array/multiply_spec.rb index f9ba20258a..ab654ce489 100644 --- a/spec/ruby/core/array/multiply_spec.rb +++ b/spec/ruby/core/array/multiply_spec.rb @@ -17,7 +17,7 @@ describe "Array#*" do it "raises a TypeError if the argument can neither be converted to a string nor an integer" do obj = mock('not a string or integer') - lambda{ [1,2] * obj }.should raise_error(TypeError) + ->{ [1,2] * obj }.should raise_error(TypeError) end it "converts the passed argument to a String rather than an Integer" do @@ -28,15 +28,15 @@ describe "Array#*" do end it "raises a TypeError is the passed argument is nil" do - lambda{ [1,2] * nil }.should raise_error(TypeError) + ->{ [1,2] * nil }.should raise_error(TypeError) end it "raises an ArgumentError when passed 2 or more arguments" do - lambda{ [1,2].send(:*, 1, 2) }.should raise_error(ArgumentError) + ->{ [1,2].send(:*, 1, 2) }.should raise_error(ArgumentError) end it "raises an ArgumentError when passed no arguments" do - lambda{ [1,2].send(:*) }.should raise_error(ArgumentError) + ->{ [1,2].send(:*) }.should raise_error(ArgumentError) end end @@ -65,8 +65,8 @@ describe "Array#* with an integer" do end it "raises an ArgumentError when passed a negative integer" do - lambda { [ 1, 2, 3 ] * -1 }.should raise_error(ArgumentError) - lambda { [] * -1 }.should raise_error(ArgumentError) + -> { [ 1, 2, 3 ] * -1 }.should raise_error(ArgumentError) + -> { [] * -1 }.should raise_error(ArgumentError) end describe "with a subclass of Array" do |