aboutsummaryrefslogtreecommitdiff
path: root/Lib/ruby/rubycomplex.swg
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/ruby/rubycomplex.swg')
-rw-r--r--Lib/ruby/rubycomplex.swg6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/ruby/rubycomplex.swg b/Lib/ruby/rubycomplex.swg
index 4e249c71f..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);
}
}
@@ -127,7 +127,7 @@ SWIG_AsVal(Type)(VALUE o, Type *val)
float re;
int res = SWIG_AddCast(SWIG_AsVal(float)(o, &re));
if (SWIG_IsOK(res)) {
- if (val) *val = Constructor(re, 0.0);
+ if (val) *val = Constructor(re, 0.0f);
return res;
}
}