Project

General

Profile

Actions

Bug #5125

closed

obj.send() documentation issue

Added by cwgem (Chris White) over 13 years ago. Updated almost 13 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.2p290 (2011-07-09) [x86_64-darwin10.8.0]
Backport:
[ruby-core:38633]

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 #1

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.


Actions

Also available in: Atom PDF

Like0
Like0