ext/attribute.cc in swift-0.7.0 vs ext/attribute.cc in swift-0.7.1
- old
+ new
@@ -3,10 +3,10 @@
ID fcall;
VALUE attribute_default(VALUE self) {
VALUE value = rb_iv_get(self, "@default");
- if (NIL_P(value) || rb_special_const_p(value))
+ if (NIL_P(value) || rb_obj_is_kind_of(value, rb_cNumeric) || rb_special_const_p(value))
return value;
else if (rb_respond_to(value, fcall))
return rb_funcall(value, fcall, 0);
else
return rb_obj_dup(value);