summaryrefslogtreecommitdiff
path: root/test/ruby/test_parse.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_parse.rb')
-rw-r--r--test/ruby/test_parse.rb14
1 files changed, 8 insertions, 6 deletions
diff --git a/test/ruby/test_parse.rb b/test/ruby/test_parse.rb
index 49ecfc56ed..14990be12c 100644
--- a/test/ruby/test_parse.rb
+++ b/test/ruby/test_parse.rb
@@ -491,14 +491,16 @@ class TestParse < Test::Unit::TestCase
end
def test_symbol
- assert_raise(SyntaxError) do
- eval ":'foo\0bar'"
+ bug = '[ruby-dev:41447]'
+ sym = "foo\0bar".to_sym
+ assert_nothing_raised(SyntaxError, bug) do
+ assert_equal(sym, eval(":'foo\0bar'"))
end
- assert_raise(SyntaxError) do
- eval ':"foo\u0000bar"'
+ assert_nothing_raised(SyntaxError, bug) do
+ assert_equal(sym, eval(':"foo\u0000bar"'))
end
- assert_raise(SyntaxError) do
- eval ':"foo\u{0}bar"'
+ assert_nothing_raised(SyntaxError, bug) do
+ assert_equal(sym, eval(':"foo\u{0}bar"'))
end
assert_raise(SyntaxError) do
eval ':"foo\u{}bar"'