diff options
Diffstat (limited to 'spec/ruby/optional/capi/array_spec.rb')
-rw-r--r-- | spec/ruby/optional/capi/array_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/ruby/optional/capi/array_spec.rb b/spec/ruby/optional/capi/array_spec.rb index 56373efe34..acd225e0e0 100644 --- a/spec/ruby/optional/capi/array_spec.rb +++ b/spec/ruby/optional/capi/array_spec.rb @@ -8,7 +8,7 @@ describe :rb_ary_new2, shared: true do end it "raises an ArgumentError when the given argument is negative" do - lambda { @s.send(@method, -1) }.should raise_error(ArgumentError) + -> { @s.send(@method, -1) }.should raise_error(ArgumentError) end end @@ -84,7 +84,7 @@ describe "C-API Array function" do end it "raises a #{frozen_error_class} if the array is frozen" do - lambda { @s.rb_ary_cat([].freeze, 1) }.should raise_error(frozen_error_class) + -> { @s.rb_ary_cat([].freeze, 1) }.should raise_error(frozen_error_class) end end @@ -131,7 +131,7 @@ describe "C-API Array function" do end it "raises a #{frozen_error_class} if the array is frozen" do - lambda { @s.rb_ary_rotate([].freeze, 1) }.should raise_error(frozen_error_class) + -> { @s.rb_ary_rotate([].freeze, 1) }.should raise_error(frozen_error_class) end end @@ -205,7 +205,7 @@ describe "C-API Array function" do it "raises an IndexError if the negative index is greater than the length" do a = [1, 2, 3] - lambda { @s.rb_ary_store(a, -10, 5) }.should raise_error(IndexError) + -> { @s.rb_ary_store(a, -10, 5) }.should raise_error(IndexError) end it "enlarges the array as needed" do @@ -216,7 +216,7 @@ describe "C-API Array function" do it "raises a #{frozen_error_class} if the array is frozen" do a = [1, 2, 3].freeze - lambda { @s.rb_ary_store(a, 1, 5) }.should raise_error(frozen_error_class) + -> { @s.rb_ary_store(a, 1, 5) }.should raise_error(frozen_error_class) end end |