mirror of
https://github.com/ruby/ruby.git
synced 2025-09-17 17:43:59 +02:00
merge revision(s) dd28c55a7c
: [Backport #19445]
[Bug#19445] Fix keyword splat in enumerator Extracted arguments do not have keyword hash to splat. --- numeric.c | 2 +- test/ruby/test_numeric.rb | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-)
This commit is contained in:
parent
4d75035e17
commit
59eb18037f
3 changed files with 5 additions and 2 deletions
|
@ -324,6 +324,9 @@ class TestNumeric < Test::Unit::TestCase
|
|||
e = 1.step(10, {by: "1"})
|
||||
assert_raise(TypeError) {e.next}
|
||||
assert_raise(TypeError) {e.size}
|
||||
e = 1.step(to: "10")
|
||||
assert_raise(ArgumentError) {e.next}
|
||||
assert_raise(ArgumentError) {e.size}
|
||||
|
||||
assert_equal(bignum*2+1, (-bignum).step(bignum, 1).size)
|
||||
assert_equal(bignum*2, (-bignum).step(bignum-1, 1).size)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue