1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

merge revision(s) 53485: [Backport #11976]

* 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/branches/ruby_2_3@54396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2016-03-29 12:11:41 +00:00
parent 0e0e4cb4cc
commit 2110125b43
4 changed files with 14 additions and 2 deletions

View file

@ -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