summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_case.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ruby/test_case.rb b/test/ruby/test_case.rb
index 0067b74e2b..f2c553e632 100644
--- a/test/ruby/test_case.rb
+++ b/test/ruby/test_case.rb
@@ -103,4 +103,15 @@ class TestCase < Test::Unit::TestCase
assert(false)
end
end
+
+ def test_method_missing
+ flag = false
+
+ case 1
+ when Class.new(BasicObject) { def method_missing(*) true end }.new
+ flag = true
+ end
+
+ assert(flag)
+ end
end