summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-02 14:46:25 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-02 14:46:25 +0000
commit306cf3ac0328cb52fad1371115aa5c3ab226b982 (patch)
treef48d4853223b8d310841e3cfa71155997220b73d /test
parent57d06d7b3f019bf3823548630da41c785828da22 (diff)
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
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_string.rb7
1 files changed, 5 insertions, 2 deletions
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