From 306cf3ac0328cb52fad1371115aa5c3ab226b982 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 2 Sep 2013 14:46:25 +0000 Subject: parse.y: valid suffix word only * parse.y (parser_str_options): use valid suffix word only, as well as numeric literal, for the backward comatibility. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_string.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'test/ruby/test_string.rb') diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb index 2e2872b9f8..5fdbaa61f4 100644 --- a/test/ruby/test_string.rb +++ b/test/ruby/test_string.rb @@ -2194,11 +2194,14 @@ class TestString < Test::Unit::TestCase end def test_unknown_string_option - assert_raises(SyntaxError) do + str = nil + assert_nothing_raised(SyntaxError) do eval(%{ - "hello"x + str = begin"hello"end }) end + assert_equal "hello", str + assert_not_predicate str, :frozen? end def test_frozen_string -- cgit v1.2.3