1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
This commit is contained in:
Benoit Daloze 2019-07-27 12:40:09 +02:00
parent a06301b103
commit 5c276e1cc9
1247 changed files with 5316 additions and 5028 deletions

View file

@ -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