diff --git a/Lib/ruby/rubyclasses.swg b/Lib/ruby/rubyclasses.swg index b345fcebe..c43f38fc5 100644 --- a/Lib/ruby/rubyclasses.swg +++ b/Lib/ruby/rubyclasses.swg @@ -207,8 +207,8 @@ namespace swig { (VALUEFUNC(swig_rescue_swallow)), Qnil); } if (ret == Qnil) { - VALUE a = rb_funcall( _obj, hash_id, 0 ); - VALUE b = rb_funcall( VALUE(other), hash_id, 0 ); + VALUE a = rb_funcall2( _obj, hash_id, 0, 0 ); + VALUE b = rb_funcall2( VALUE(other), hash_id, 0, 0 ); res = op_func(a, b); } else { res = RTEST(ret); diff --git a/Lib/ruby/rubycomplex.swg b/Lib/ruby/rubycomplex.swg index a62bfe531..d2aaf6cb1 100644 --- a/Lib/ruby/rubycomplex.swg +++ b/Lib/ruby/rubycomplex.swg @@ -36,12 +36,12 @@ SWIGINTERN int SWIG_Is_Complex( VALUE obj ) { SWIGINTERN VALUE SWIG_Complex_Real(VALUE obj) { static ID real_id = rb_intern("real"); - return rb_funcall(obj, real_id, 0); + return rb_funcall2(obj, real_id, 0, 0); } SWIGINTERN VALUE SWIG_Complex_Imaginary(VALUE obj) { static ID imag_id = rb_intern("imag"); - return rb_funcall(obj, imag_id, 0); + return rb_funcall2(obj, imag_id, 0, 0); } } diff --git a/Lib/ruby/rubycontainer.swg b/Lib/ruby/rubycontainer.swg index e72330853..597ae83d2 100644 --- a/Lib/ruby/rubycontainer.swg +++ b/Lib/ruby/rubycontainer.swg @@ -803,9 +803,9 @@ namespace swig static ID id_start = rb_intern("begin"); static ID id_noend = rb_intern("exclude_end?"); - VALUE start = rb_funcall( i, id_start, 0 ); - VALUE end = rb_funcall( i, id_end, 0 ); - bool noend = ( rb_funcall( i, id_noend, 0 ) == Qtrue ); + VALUE start = rb_funcall2( i, id_start, 0, 0 ); + VALUE end = rb_funcall2( i, id_end, 0, 0 ); + bool noend = ( rb_funcall2( i, id_noend, 0, 0 ) == Qtrue ); int len = $self->size(); diff --git a/Lib/ruby/rubyrun.swg b/Lib/ruby/rubyrun.swg index 3b6fd32b0..7c94c4e12 100644 --- a/Lib/ruby/rubyrun.swg +++ b/Lib/ruby/rubyrun.swg @@ -443,7 +443,7 @@ int SWIG_Ruby_arity( VALUE proc, int minimal ) { if ( rb_respond_to( proc, swig_arity_id ) ) { - VALUE num = rb_funcall( proc, swig_arity_id, 0 ); + VALUE num = rb_funcall2( proc, swig_arity_id, 0, 0 ); int arity = NUM2INT(num); if ( arity < 0 && (arity+1) < -minimal ) return 1; if ( arity == minimal ) return 1; diff --git a/Lib/ruby/std_map.i b/Lib/ruby/std_map.i index 7077fa104..6dd2ffa72 100644 --- a/Lib/ruby/std_map.i +++ b/Lib/ruby/std_map.i @@ -96,7 +96,7 @@ int res = SWIG_ERROR; if ( TYPE(obj) == T_HASH ) { static ID id_to_a = rb_intern("to_a"); - VALUE items = rb_funcall(obj, id_to_a, 0); + VALUE items = rb_funcall2(obj, id_to_a, 0, 0); res = traits_asptr_stdseq, std::pair >::asptr(items, val); } else { map_type *p; diff --git a/Lib/ruby/std_multimap.i b/Lib/ruby/std_multimap.i index 762a87653..5d8e33e97 100644 --- a/Lib/ruby/std_multimap.i +++ b/Lib/ruby/std_multimap.i @@ -23,7 +23,7 @@ int res = SWIG_ERROR; if ( TYPE(obj) == T_HASH ) { static ID id_to_a = rb_intern("to_a"); - VALUE items = rb_funcall(obj, id_to_a, 0); + VALUE items = rb_funcall2(obj, id_to_a, 0, 0); return traits_asptr_stdseq, std::pair >::asptr(items, val); } else { multimap_type *p; diff --git a/Lib/ruby/std_unordered_map.i b/Lib/ruby/std_unordered_map.i index 48c875214..3c6b65027 100644 --- a/Lib/ruby/std_unordered_map.i +++ b/Lib/ruby/std_unordered_map.i @@ -23,7 +23,7 @@ int res = SWIG_ERROR; if (TYPE(obj) == T_HASH) { static ID id_to_a = rb_intern("to_a"); - VALUE items = rb_funcall(obj, id_to_a, 0); + VALUE items = rb_funcall2(obj, id_to_a, 0, 0); res = traits_asptr_stdseq, std::pair >::asptr(items, val); } else { map_type *p; diff --git a/Lib/ruby/std_unordered_multimap.i b/Lib/ruby/std_unordered_multimap.i index ebc53b597..c3261f9e6 100644 --- a/Lib/ruby/std_unordered_multimap.i +++ b/Lib/ruby/std_unordered_multimap.i @@ -23,7 +23,7 @@ int res = SWIG_ERROR; if ( TYPE(obj) == T_HASH ) { static ID id_to_a = rb_intern("to_a"); - VALUE items = rb_funcall(obj, id_to_a, 0); + VALUE items = rb_funcall2(obj, id_to_a, 0, 0); return traits_asptr_stdseq, std::pair >::asptr(items, val); } else { multimap_type *p; diff --git a/Lib/ruby/timeval.i b/Lib/ruby/timeval.i index e7bc2d322..94a75c802 100644 --- a/Lib/ruby/timeval.i +++ b/Lib/ruby/timeval.i @@ -55,7 +55,7 @@ struct timeval rb_time_timeval(VALUE); if (NIL_P($input)) $1 = (time_t)-1; else - $1 = NUM2LONG(rb_funcall($input, rb_intern("tv_sec"), 0)); + $1 = NUM2LONG(rb_funcall2($input, rb_intern("tv_sec"), 0, 0)); } %typemap(typecheck) time_t