Bug #5125
closedobj.send() documentation issue
Description
Filing this as a bug per request of Eric Hodel on the ruby-talk mailing list. Excerpt from the mailing list post ( http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/386033 ):
================
obj.send(symbol [, args...]) obj
obj.send(symbol [, args...]) ¢ª obj
Somehow, I don't expect the return value of send() to be the receiver.
Let's test send()'s return value using the example provided:
class Klass
def hello(*args)
"Hello " + args.join(' ')
end
end
k = Klass.new
x = k.send :hello, "gentle", "readers"
puts x.class
--output:--
String
The issue is that appears that from the signature, the same object will be returned. This may or may not be the case depending on the return of the method that send is utilizing.
Updated by ayumin (Ayumu AIZAWA) almost 13 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r34161.
Chris, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
- vm_eval.c (rb_f_send): fix [Bug #5125] [ruby-core:38633]