summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_literal.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_literal.rb b/test/ruby/test_literal.rb
index 80c8af9312..b4480f725a 100644
--- a/test/ruby/test_literal.rb
+++ b/test/ruby/test_literal.rb
@@ -52,6 +52,13 @@ class TestRubyLiteral < Test::Unit::TestCase
assert_equal "\1", "\1"
assert_equal "3", "\x33"
assert_equal "\n", "\n"
+ bug2500 = '[ruby-core:27228]'
+ %w[c C- M-].each do |pre|
+ ["u", "x", %w[u{ }]].each do |open, close|
+ str = "\"\\#{pre}\\#{open}5555#{close}\""
+ assert_raise(SyntaxError, "#{bug2500} eval(#{str})") {eval(str)}
+ end
+ end
end
def test_dstring