diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-07-18 11:40:21 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-07-18 11:40:21 +0900 |
commit | e0e12202c7688881b8fcdad96669ca0cd7be8622 (patch) | |
tree | 6b3aa1ebb6bdf9089b92f7450773deb093375e60 /spec/ruby/optional/capi/array_spec.rb | |
parent | 4885c44bca25346716969a3a0732c1bfea60f508 (diff) |
Use rb_block_call() instead of the deprecated rb_iterate()
Diffstat (limited to 'spec/ruby/optional/capi/array_spec.rb')
-rw-r--r-- | spec/ruby/optional/capi/array_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/ruby/optional/capi/array_spec.rb b/spec/ruby/optional/capi/array_spec.rb index 8d003fb2b1..8e90980c6a 100644 --- a/spec/ruby/optional/capi/array_spec.rb +++ b/spec/ruby/optional/capi/array_spec.rb @@ -343,10 +343,10 @@ describe "C-API Array function" do end end - describe "rb_iterate" do + describe "rb_block_call" do it "calls an callback function as a block passed to an method" do s = [1,2,3,4] - s2 = @s.rb_iterate(s) + s2 = @s.rb_block_call(s) s2.should == s @@ -357,7 +357,7 @@ describe "C-API Array function" do it "calls a function with the other function available as a block" do h = {a: 1, b: 2} - @s.rb_iterate_each_pair(h).sort.should == [1,2] + @s.rb_block_call_each_pair(h).sort.should == [1,2] end it "calls a function which can yield into the original block" do @@ -371,7 +371,7 @@ describe "C-API Array function" do yield 4 end - @s.rb_iterate_then_yield(o) { |x| s2 << x } + @s.rb_block_call_then_yield(o) { |x| s2 << x } s2.should == [1,2,3,4] end |