From a94833eb503358ac3fe434e13be41007b92558b1 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 2 Sep 2013 14:56:03 +0000 Subject: [PATCH] test_string.rb: yet another test * test/ruby/test_string.rb (TestString#test_frozen_string_adjacent): option is allowed after the last string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_string.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) 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(%{