aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_string.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-07 22:57:00 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-07 22:57:00 +0000
commitfc5a26c2d41fade0771217e5b8ba257249db5251 (patch)
treeaec504466ed324528f72d21ea27f8a84c30c1804 /test/ruby/test_string.rb
parentf07c8e6413f6f345f0520de75c82cc86d58fceb1 (diff)
downloadruby-fc5a26c2d41fade0771217e5b8ba257249db5251.tar.gz
* string.c (rb_str_buf_append): fix append itself.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14941 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_string.rb')
-rw-r--r--test/ruby/test_string.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb
index 524ab47051..647c520707 100644
--- a/test/ruby/test_string.rb
+++ b/test/ruby/test_string.rb
@@ -170,6 +170,12 @@ class TestString < Test::Unit::TestCase
def test_LSHIFT # '<<'
assert_equal(S("world!"), S("world") << 33)
assert_equal(S("world!"), S("world") << S('!'))
+
+ s = "a"
+ 10.times {|i|
+ s << s
+ assert_equal("a" * (2<<i), s)
+ }
end
def test_MATCH # '=~'