summaryrefslogtreecommitdiff
path: root/test/ruby/test_pattern_matching.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_pattern_matching.rb')
-rw-r--r--test/ruby/test_pattern_matching.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_pattern_matching.rb b/test/ruby/test_pattern_matching.rb
index 8e8a7102aa..175b308ce8 100644
--- a/test/ruby/test_pattern_matching.rb
+++ b/test/ruby/test_pattern_matching.rb
@@ -199,6 +199,12 @@ class TestPatternMatching < Test::Unit::TestCase
a == 1
end
end
+
+ assert_syntax_error(%q{
+ case 0
+ in ^a
+ end
+ }, /no such local variable/)
end
def test_literal_value_pattern