parser: setup numbered parameters in new_lambda and adjust dump_prefix offset

This commit is contained in:
Hoshiumi Arata
2024-11-13 22:19:27 +09:00
parent 13acf12df5
commit 9fe2a5c46a
2 changed files with 3 additions and 1 deletions
+1
View File
@@ -711,6 +711,7 @@ end
assert('numbered parameters') do
assert_equal(15, [1,2,3,4,5].reduce {_1+_2})
assert_equal(45, Proc.new do _1 + _2 + _3 + _4 + _5 + _6 + _7 + _8 + _9 end.call(*[1, 2, 3, 4, 5, 6, 7, 8, 9]))
assert_equal(5, -> { _1 }.call(5))
end
assert('_0 is not numbered parameter') do