summaryrefslogtreecommitdiff
path: root/test/ruby/test_string.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-02 14:56:03 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-02 14:56:03 +0000
commita94833eb503358ac3fe434e13be41007b92558b1 (patch)
treeb34c668d56672a6d87afb15d6de3f0a09b6149ea /test/ruby/test_string.rb
parent306cf3ac0328cb52fad1371115aa5c3ab226b982 (diff)
downloadruby-a94833eb503358ac3fe434e13be41007b92558b1.tar.gz
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
Diffstat (limited to 'test/ruby/test_string.rb')
-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(%{