[1.8.7] Hash.[] should call to_ary if only one argument is provided
-------------------------------------------------------------------

                 Key: JRUBY-2587
                 URL: http://jira.codehaus.org/browse/JRUBY-2587
             Project: JRuby
          Issue Type: New Feature
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.1.2
         Environment: JRuby 1.1.2
            Reporter: Vladimir Sizikov


*NOTE*: This is MRI 1.8.7-level feature:

Hash.[] should call to_ary if only one argument is provided:

{noformat}
class Foo
  def to_ary
    [[1,2],[3,4]]
  end
end

p Hash[Foo.new]

Should produce:
{1=>2, 3=>4}
{noformat}

See also JRUBY-2585.


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


Reply via email to