Project

General

Profile

Actions

Bug #9749

closed

r45589 introduced an incompatibility

Added by mame (Yusuke Endoh) almost 10 years ago. Updated over 9 years ago.

Status:
Closed
Target version:
ruby -v:
ruby 2.2.0dev (2014-04-16 trunk 45599) [x86_64-linux]
[ruby-core:62060]

Description

$ ruby -ve 'ary = []; (1..10).each_slice(3, &lambda {|a, *| ary << a }); p ary'
ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-linux]
[[1, 2, 3], [4, 5, 6], [7, 8, 9], [10]]

$ ./miniruby -ve 'ary = []; (1..10).each_slice(3, &lambda {|a, *| ary << a }); p ary'
ruby 2.2.0dev (2014-04-16 trunk 45599) [x86_64-linux]
[[10], [10], [10], [10]]

See also: https://github.com/ruby/ruby/pull/596#issuecomment-40594384

--
Yusuke Endoh

Actions

Also available in: Atom PDF

Like0
Like0Like0