Enumerable does not splat ------------------------- Key: JRUBY-6171 URL: https://jira.codehaus.org/browse/JRUBY-6171 Project: JRuby Issue Type: Bug Affects Versions: JRuby 1.6.5, JRuby 1.6.4 Environment: jruby 1.6.4 (ruby-1.9.2-p136) (2011-08-23 17ea768) (OpenJDK Client VM 1.7.0-ea) [darwin-i386-java]
Reporter: Theo Hultberg Assignee: Thomas E Enebo It seems like Enumerable changed its behaviour between 1.6.3 and 1.6.4, it no longer splats the yielded arguments: Running this code in 1.6.3: {noformat} x = Enumerator.new do |y| ('a'..'z').each do |letter| y << [letter, letter.upcase] end end x.each do |downcased, upcased| puts %(#{downcased.inspect} #{upcased.inspect}) end {noformat} gives the following output: {noformat} "a" "A" "b" "B" "c" "C" "d" "D" "e" "E" ... {noformat} which is the same as MRI 1.9.2 gives, however, in 1.6.4 this is what is printed: {noformat} ["a", "A"] nil ["b", "B"] nil ["c", "C"] nil ["d", "D"] nil ["e", "E"] nil ... {noformat} The first argument to the block contains the array, instead of splatting it across all the arguments to the block. -- This message is automatically generated by JIRA. 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