aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_string.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_string.rb')
-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