aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_string.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb
index 5fdbaa61f4..06a92c5957 100644
--- a/test/ruby/test_string.rb
+++ b/test/ruby/test_string.rb
@@ -2225,6 +2225,17 @@ class TestString < Test::Unit::TestCase
assert_equal "2", f.call
end
+ def test_frozen_string_adjacent
+ str = nil
+ assert_nothing_raised(SyntaxError) do
+ eval(%{
+ str = "hello" "world"f
+ })
+ end
+ assert_equal "helloworld", str
+ assert_predicate str, :frozen?
+ end
+
def test_frozen_string_cannot_be_adjacent
assert_raise(SyntaxError) do
eval(%{