summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRichard Böhme <[email protected]>2025-05-21 18:14:28 +0900
committerNobuyoshi Nakada <[email protected]>2025-05-21 22:12:34 +0900
commit9a41d76b830d1f1feed46e0c3c8640a413f0e94e (patch)
tree1a3dc16ccaaacc678eda1878f9a00c8cc5353200 /test
parent081a44f586b19e66be5a22d2f7d29b34de453efb (diff)
Fix one-by-one error of numbered parameter ID
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/13395
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_proc.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_proc.rb b/test/ruby/test_proc.rb
index 35aa16063d..f6b9e6d063 100644
--- a/test/ruby/test_proc.rb
+++ b/test/ruby/test_proc.rb
@@ -1637,6 +1637,10 @@ class TestProc < Test::Unit::TestCase
assert_equal(3, b.local_variable_get(:when))
assert_equal(4, b.local_variable_get(:begin))
assert_equal(5, b.local_variable_get(:end))
+
+ assert_raise_with_message(NameError, /local variable \Wdefault\W/) {
+ binding.local_variable_get(:default)
+ }
end
def test_local_variable_set