aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_call.rb
diff options
context:
space:
mode:
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