Skip to content

Commit e7ddba7

Browse files
committed
Remove the behavior that rb_funcall() passes the rb_iterate() block
* From MRI docs: rb_iterate() is obsolete since 1.9; use rb_block_call instead.
1 parent 746ef16 commit e7ddba7

File tree

4 files changed

+3
-2
lines changed

4 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ Performance:
4949

5050
Changes:
5151

52+
* `rb_iterate()` (deprecated since 1.9) no longer magically passes the block to `rb_funcall()`, use `rb_block_call()` instead.
5253

5354
Security:
5455

lib/truffle/truffle/cext.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,7 @@ def rb_funcallv(recv, meth, args)
878878
end
879879

880880
def rb_funcall(recv, meth, n, *args)
881-
Primitive.send_without_cext_lock(recv, meth, args, rb_block_proc)
881+
Primitive.send_without_cext_lock(recv, meth, args, nil)
882882
end
883883

884884
def rb_apply(recv, meth, args)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
fails(deprecated):C-API Array function rb_iterate calls a function with the other function available as a block

spec/tags/optional/capi/proc_tags.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@ fails:C-API when calling Proc.new from a C function returns the Proc passed by t
22
fails:C-API when calling Proc.new from a C function returns the Proc passed to the Ruby method when the C function calls other Ruby methods before calling Proc.new
33
fails:C-API when calling Proc.new from a C function returns the most recent Proc passed when the Ruby method called the C function
44
fails:C-API when calling Proc.new from a C function returns the Proc passed from the original Ruby call to the C function
5-
fails:C-API when calling Proc.new from a C function raises an ArgumentError when the C function calls a Ruby method that calls Proc.new

0 commit comments

Comments
 (0)