Issue #5730 has been reported by Yukihiro Matsumoto.

----------------------------------------
Bug #5730: Optinal block parameters assigns wrong
http://redmine.ruby-lang.org/issues/5730

Author: Yukihiro Matsumoto
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 
ruby -v: ruby 2.0.0dev (2011-12-09 trunk 33990) [i486-linux]ruby 2.0.0dev (2011-12-09 trunk 33990) [i486-linux] 


The following program do not expand the given array, but it should expand the value.


def foo(&block)
  block.call([1,2])
end
h = foo{|k=6,v=8|
  p [k,v]   # gives [[1,2],8] but should be [1,2]
}


-- 
http://redmine.ruby-lang.org