Actions
Bug #5125
closedobj.send() documentation issue
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.2p290 (2011-07-09) [x86_64-darwin10.8.0]
Backport:
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.
Actions
Like0
Like0