Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[fix #77] make sure to call #description with Objective-C objects

  • Loading branch information...
commit 600bb249425d7cd196fbe6ed8a5f64d8b315e2be 1 parent 092ad9e
@Watson1978 Watson1978 authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 object.c
View
5 object.c
@@ -473,8 +473,9 @@ rb_obj_inspect(VALUE obj, SEL sel)
}
}
}
- else if (!SPECIAL_CONST_P(obj) && !RCLASS_RUBY(RBASIC(obj)->klass)) {
- return rb_str_new3(rb_vm_call(obj, selDescription, 0, 0));
+ else if (!SPECIAL_CONST_P(obj) &&
+ !(RCLASS_RUBY(obj) || RCLASS_RUBY(RBASIC(obj)->klass))) {
+ return rb_str_new3(rb_vm_call(obj, selDescription, 0, 0));
}
return rb_funcall(obj, rb_intern("to_s"), 0, 0);
}
Please sign in to comment.
Something went wrong with that request. Please try again.