Skip to content

Commit 252cee0

Browse files
committed
Emit deprecation warnings for rb_iterate()
* Already in 2.7 for TruffleRuby (3.1 for CRuby, but the function is marked as obsolete since 1.9) because rb_funcall() no longer magically pass the block when under rb_iterate() on TruffleRuby. * Like ruby/ruby#4629
1 parent 22fca50 commit 252cee0

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/cext/ABI_check.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5
1+
6

lib/cext/include/ruby/ruby.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2207,6 +2207,7 @@ int rb_keyword_given_p(void);
22072207
int rb_block_given_p(void);
22082208
void rb_need_block(void);
22092209
VALUE rb_iterate(VALUE(*)(VALUE),VALUE,rb_block_call_func_t,VALUE);
2210+
DEPRECATED_BY(rb_block_call since 1.9, VALUE rb_iterate(VALUE(*)(VALUE),VALUE,rb_block_call_func_t,VALUE));
22102211
VALUE rb_block_call(VALUE,ID,int,const VALUE*,rb_block_call_func_t,VALUE);
22112212
VALUE rb_block_call_kw(VALUE,ID,int,const VALUE*,rb_block_call_func_t,VALUE,int);
22122213
VALUE rb_rescue(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE,VALUE),VALUE);

0 commit comments

Comments
 (0)