We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 081a44f commit 12ddd83Copy full SHA for 12ddd83
2 files changed
proc.c
@@ -507,7 +507,7 @@ bind_local_variables(VALUE bindval)
507
int
508
rb_numparam_id_p(ID id)
509
{
510
- return (tNUMPARAM_1 << ID_SCOPE_SHIFT) <= id && id < ((tNUMPARAM_1 + 10) << ID_SCOPE_SHIFT);
+ return (tNUMPARAM_1 << ID_SCOPE_SHIFT) <= id && id < ((tNUMPARAM_1 + 9) << ID_SCOPE_SHIFT);
511
}
512
513
/*
test/ruby/test_proc.rb
@@ -1637,6 +1637,10 @@ def test_local_variable_get
1637
assert_equal(3, b.local_variable_get(:when))
1638
assert_equal(4, b.local_variable_get(:begin))
1639
assert_equal(5, b.local_variable_get(:end))
1640
+
1641
+ assert_raise_with_message(NameError, /local variable \Wdefault\W/) {
1642
+ binding.local_variable_get(:default)
1643
+ }
1644
end
1645
1646
def test_local_variable_set
0 commit comments