aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_stringchar.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-10-25 14:06:31 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-10-25 14:06:31 +0000
commite6c5b9f30840ae985c4bdcb91435e9c2c06fb7ef (patch)
treec13b0ab1c74db848c100581d765fd52073f7be03 /test/ruby/test_stringchar.rb
parentc6629c48e61f341aa5e0b4b8f0c4816a2e9e0cc1 (diff)
downloadruby-e6c5b9f30840ae985c4bdcb91435e9c2c06fb7ef.tar.gz
revert r37326 "remove string literal concatenation"
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_stringchar.rb')
-rw-r--r--test/ruby/test_stringchar.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_stringchar.rb b/test/ruby/test_stringchar.rb
index 7a4f77d967..4cae57f85f 100644
--- a/test/ruby/test_stringchar.rb
+++ b/test/ruby/test_stringchar.rb
@@ -5,6 +5,10 @@ class TestStringchar < Test::Unit::TestCase
assert_equal("abcd", "abcd")
assert_match(/abcd/, "abcd")
assert("abcd" === "abcd")
+ # compile time string concatenation
+ assert_equal("abcd", "ab" "cd")
+ assert_equal("22aacd44", "#{22}aa" "cd#{44}")
+ assert_equal("22aacd445566", "#{22}aa" "cd#{44}" "55" "#{66}")
assert("abc" !~ /^$/)
assert("abc\n" !~ /^$/)
assert("abc" !~ /^d*$/)