summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-02-17 10:57:22 +0900
committerGitHub <noreply@github.com>2023-02-17 10:57:22 +0900
commitdd28c55a7cd6780dad637b4d6a20507fbfc6af4a (patch)
tree213b5fc66d0e64bac3565334fe4c5e6185cdc3fc /test
parenta4b7ec12298c78392797e5ba7704076550e4f100 (diff)
[Bug#19445] Fix keyword splat in enumerator
Extracted arguments do not have keyword hash to splat.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/7325 Merged-By: nobu <nobu@ruby-lang.org>
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_numeric.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_numeric.rb b/test/ruby/test_numeric.rb
index 0593cb535d..ab492743f6 100644
--- a/test/ruby/test_numeric.rb
+++ b/test/ruby/test_numeric.rb
@@ -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)