mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
symbol.h: unexpected safe call
* symbol.h (is_attrset_id): ASET is an attrset ID. fix unexpected safe call instead of an ordinary ASET. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f6dcbf7472
commit
c79402c4f0
3 changed files with 13 additions and 1 deletions
|
@ -83,4 +83,11 @@ class TestCall < Test::Unit::TestCase
|
|||
def test_safe_call_block_call_command
|
||||
assert_nil(("a".sub! "b" do end&.foo 1 do end))
|
||||
end
|
||||
|
||||
def test_invalid_safe_call
|
||||
h = nil
|
||||
assert_raise(NoMethodError) {
|
||||
h[:foo] = nil
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue