Time#local doesn't recognize string-like second argument
--------------------------------------------------------
Key: JRUBY-1882
URL: http://jira.codehaus.org/browse/JRUBY-1882
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.x
Environment: Latest JRuby 1.1b1
Reporter: Vladimir Sizikov
Attachments: time-local-string-arg.patch
Consider the following example:
{noformat}
class Month
def to_str
"12"
end
end
p Time.local(2008, Month.new)
{noformat}
MRI prints:
Mon Dec 01 00:00:00 +0100 2008
JRuby prints:
can't convert Month into Integer (TypeError)
This also fails two rubyspecs (I've just added them, heh).
The proposed patch fixes the problem and the spec failures.
--
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