diff options
author | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-09-20 22:02:10 +0000 |
---|---|---|
committer | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-09-20 22:02:10 +0000 |
commit | 789b421665239974ffb7d65092cd17766d34169b (patch) | |
tree | fa47dd96a029a92bdd893f0aff60e930711f5195 /vm_eval.c | |
parent | b9259b1dc3ccd53c0d5e717876a1a6e6ef69e79d (diff) | |
download | ruby-789b421665239974ffb7d65092cd17766d34169b.tar.gz |
check_funcall_missing() should call respond_to_missing?(name, priv=true)
* Improve spec rather than constrain implementation.
* Coercion ignores visibility in Ruby.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_eval.c')
-rw-r--r-- | vm_eval.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -315,8 +315,6 @@ check_funcall_exec(struct rescue_funcall_args *args) args->me, args->argc, args->argv); } -#define PRIV Qfalse /* TODO: for rubyspec now, should be Qtrue */ - static VALUE check_funcall_failed(struct rescue_funcall_args *args, VALUE e) { @@ -361,7 +359,7 @@ check_funcall_missing(rb_thread_t *th, VALUE klass, VALUE recv, ID mid, int argc VALUE ret = Qundef; ret = basic_obj_respond_to_missing(th, klass, recv, - ID2SYM(mid), PRIV); + ID2SYM(mid), Qtrue); if (!RTEST(ret)) return def; args.respond = respond > 0; args.respond_to_missing = (ret != Qundef); |