summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_call.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_call.rb b/test/ruby/test_call.rb
index 12793a7572..d30890d6a1 100644
--- a/test/ruby/test_call.rb
+++ b/test/ruby/test_call.rb
@@ -46,9 +46,13 @@ class TestCall < Test::Unit::TestCase
assert_equal(5, o.y)
o.?z ||= 6
assert_equal(6, o.z)
+ assert_equal(42, o.?[:x])
+ assert_equal(42, o.?["x"])
o = nil
assert_nil(o.?x)
+ assert_nil(o.?[:x])
+ assert_nil(o.?["x"])
assert_nothing_raised(NoMethodError) {o.?x = 6}
assert_nothing_raised(NoMethodError) {o.?x *= 7}
end