aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_call.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-01-09 09:26:23 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-01-09 09:26:23 +0000
commit4a70c4905b4a98a353eabab917eea9dae0719ad9 (patch)
tree1f294f56e7fa4ceaebb89026fb9bdf2ff9ad87aa /test/ruby/test_call.rb
parentf4ce2f5527df0bb052b433e1fc109265ad0e8c3f (diff)
downloadruby-4a70c4905b4a98a353eabab917eea9dae0719ad9.tar.gz
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
Diffstat (limited to 'test/ruby/test_call.rb')
-rw-r--r--test/ruby/test_call.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_call.rb b/test/ruby/test_call.rb
index 7ef8d06936..fb79eadb64 100644
--- a/test/ruby/test_call.rb
+++ b/test/ruby/test_call.rb
@@ -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