diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-24 08:15:37 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-24 08:15:37 +0000 |
commit | 99ab1fed49ba6b441fa5a6ae3d6818fae09b760e (patch) | |
tree | 21fffe519e07d247b641aec887e5fb17eb87e125 /eval.c | |
parent | ac150ad226ce961dd8b0563cb2cd52ca07beb71e (diff) | |
download | ruby-99ab1fed49ba6b441fa5a6ae3d6818fae09b760e.tar.gz |
* eval.c (rb_f_send_bang): abandon the name funcall for private
aware method call.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -1437,7 +1437,7 @@ rb_apply(VALUE recv, ID mid, VALUE args) } static VALUE -send_funcall(int argc, VALUE *argv, VALUE recv, int scope) +send_internal(int argc, VALUE *argv, VALUE recv, int scope) { VALUE vid; @@ -1479,26 +1479,26 @@ rb_f_send(int argc, VALUE *argv, VALUE recv) scope = NOEX_NOSUPER | NOEX_PRIVATE; } - return send_funcall(argc, argv, recv, scope); + return send_internal(argc, argv, recv, scope); } /* * call-seq: - * obj.funcall(symbol [, args...]) => obj - * obj.__send!(symbol [, args...]) => obj + * obj.send!(symbol [, args...]) => obj + * obj.__send!(symbol [, args...]) => obj * * Invokes the method identified by _symbol_, passing it any - * arguments specified. Unlike send, which calls private methods only - * when it is invoked in function call style, funcall always aware of + * arguments specified. Unlike send, which calls public methods only + * when it is invoked in function call style, send! always aware of * private methods. * - * 1.funcall(:puts, "hello") # prints "foo" + * 1.send!(:puts, "hello") # prints "foo" */ VALUE -rb_f_funcall(int argc, VALUE *argv, VALUE recv) +rb_f_send_bang(int argc, VALUE *argv, VALUE recv) { - return send_funcall(argc, argv, recv, NOEX_NOSUPER | NOEX_PRIVATE); + return send_internal(argc, argv, recv, NOEX_NOSUPER | NOEX_PRIVATE); } VALUE @@ -2730,8 +2730,8 @@ Init_eval(void) rb_define_method(rb_cBasicObject, "send", rb_f_send, -1); rb_define_method(rb_cBasicObject, "__send__", rb_f_send, -1); rb_define_method(rb_cBasicObject, "__send", rb_f_send, -1); - rb_define_method(rb_cBasicObject, "funcall", rb_f_funcall, -1); - rb_define_method(rb_cBasicObject, "__send!", rb_f_funcall, -1); + rb_define_method(rb_cBasicObject, "send!", rb_f_send_bang, -1); + rb_define_method(rb_cBasicObject, "__send!", rb_f_send_bang, -1); rb_define_method(rb_mKernel, "instance_eval", rb_obj_instance_eval, -1); rb_define_method(rb_mKernel, "instance_exec", rb_obj_instance_exec, -1); |