Hiro Asari created JRUBY-6289:
---------------------------------

             Summary: [1.9] when yield is called with a splat arg, the block 
gets the argument as a single Array
                 Key: JRUBY-6289
                 URL: https://jira.codehaus.org/browse/JRUBY-6289
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules, Ruby 1.9.3
         Environment: master, 1.9 mode
            Reporter: Hiro Asari
         Attachments: jruby-6173.rb

The script below prints
{noformat}
k: [a, 1], v: 
{noformat}
in 1.9 mode, which is wrong.

{noformat}
def foo(obj)
  obj.each_pair do |*v|
    yield *v
  end
end

h = {:a => 1}

foo (h) do |k,v|
  puts "k: #{k}, v: #{v}" # should print "k: a, v: 1"
end
{noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://jira.codehaus.org/secure/ContactAdministrators!default.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