Aliased method fails equality test
----------------------------------
Key: JRUBY-4904
URL: http://jira.codehaus.org/browse/JRUBY-4904
Project: JRuby
Issue Type: Bug
Affects Versions: JRuby 1.5.1
Environment: Tiger, JRuby 1.5.1, Java 1.5
Reporter: Daniel Berger
Assignee: Thomas E Enebo
I smoked out this curious bug as the result of net-ping. I'm not sure if it's a
scoping issue or what:
{noformat}
module Net
class Ping
attr_accessor :host
def initialize(host, port, timeout)
end
end
end
module Net
class Ping::HTTP < Ping
def initialize(uri=nil, port=80, timeout=5)
super(uri, port, timeout)
end
alias uri host
end
end
p1 = Net::Ping::HTTP.new
# True in MRI, false in JRuby
p p1.method(:host) == p1.method(:uri)
{noformat}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email