summaryrefslogtreecommitdiffstats
path: root/test/ruby
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
commit5b944457d1383d9e3183fae5a400b75c2948c468 (patch)
treeaec504466ed324528f72d21ea27f8a84c30c1804 /test/ruby
parentbf10c140be1c464cf53256bb077aae750936e10e (diff)
downloadruby-5b944457d1383d9e3183fae5a400b75c2948c468.tar.gz
ruby-5b944457d1383d9e3183fae5a400b75c2948c468.tar.xz
ruby-5b944457d1383d9e3183fae5a400b75c2948c468.zip
* string.c (rb_str_buf_append): fix append itself.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14941 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-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 524ab4705..647c52070 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 # '=~'