summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/t/string.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/t/string.rb b/test/t/string.rb
index 7f81c9335..5e92ae345 100644
--- a/test/t/string.rb
+++ b/test/t/string.rb
@@ -713,3 +713,10 @@ assert('String#freeze') do
assert_raise(RuntimeError) { str.upcase! }
end
+
+assert('String literal concatenation') do
+ assert_equal 2, ("A" "B").size
+ assert_equal 3, ('A' "B" 'C').size
+ assert_equal 3, (?A "#{?B}C").size
+ assert_equal 4, (%(A) "B#{?C}" "D").size
+end