diff options
author | zzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-02-24 04:24:52 +0000 |
---|---|---|
committer | zzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-02-24 04:24:52 +0000 |
commit | bd88e6c0b5f01ebdd2d758bd86845eb44605d4f0 (patch) | |
tree | 6048c39cc05389d4e37d2c9323c56f204ce4a2a9 /vm_eval.c | |
parent | 6aaf5c5ca0f2322ba1d9001bdd1b9db649cb5419 (diff) | |
download | bundler-bd88e6c0b5f01ebdd2d758bd86845eb44605d4f0.tar.gz |
* object.c: Document methods receiving string and convert to symbol
Patch by Stefan Rusterholz
* vm_eval.c: ditto
* vm_method.c: ditto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_eval.c')
-rw-r--r-- | vm_eval.c | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -862,13 +862,17 @@ send_internal(int argc, const VALUE *argv, VALUE recv, call_type scope) } /* - * call-seq: - * foo.send(symbol [, args...]) -> obj - * foo.__send__(symbol [, args...]) -> obj + * call-seq: + * foo.send(symbol [, args...]) -> obj + * foo.__send__(symbol [, args...]) -> obj + * foo.send(string [, args...]) -> obj + * foo.__send__(string [, args...]) -> obj * * Invokes the method identified by _symbol_, passing it any * arguments specified. You can use <code>__send__</code> if the name * +send+ clashes with an existing method in _obj_. + * When the method is identified by a string, the string is converted + * to a symbol. * * class Klass * def hello(*args) @@ -888,10 +892,13 @@ rb_f_send(int argc, VALUE *argv, VALUE recv) /* * call-seq: * obj.public_send(symbol [, args...]) -> obj + * obj.public_send(string [, args...]) -> obj * * Invokes the method identified by _symbol_, passing it any * arguments specified. Unlike send, public_send calls public * methods only. + * When the method is identified by a string, the string is converted + * to a symbol. * * 1.public_send(:puts, "hello") # causes NoMethodError */ |