diff options
| author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-28 15:14:30 +0000 |
|---|---|---|
| committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-28 15:14:30 +0000 |
| commit | d85fc227005f1762fcb1485aeec22d085e6ac797 (patch) | |
| tree | ff948c18c89b78a3c7351177a4793f0819c36c59 | |
| parent | a1965a0c4b01df538bba17055cd54755ea11665b (diff) | |
* eval.c (rb_obj_respond_to): use RTEST to test the result of
respond_to? method.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@17636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | eval.c | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Sun Jun 29 00:13:06 2008 Tanaka Akira <akr@fsij.org> + + * eval.c (rb_obj_respond_to): use RTEST to test the result of + respond_to? method. + Sat Jun 28 19:13:41 2008 URABE Shyouhei <shyouhei@ruby-lang.org> * class.c (clone_method): use rb_copy_node_scope. @@ -4233,7 +4233,7 @@ rb_obj_respond_to(obj, id, priv) int n = 0; args[n++] = ID2SYM(id); if (priv) args[n++] = Qtrue; - return rb_funcall2(obj, respond_to, n, args); + return RTEST(rb_funcall2(obj, respond_to, n, args)); } } |
