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/optional/capi/array_spec.rb | |
parent | a06301b103371b0b7da8eaca26ba744961769f99 (diff) |
Update to ruby/spec@875a09e
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 |