diff options
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 |