1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
akr 2008-01-07 22:57:00 +00:00
parent f07c8e6413
commit fc5a26c2d4
3 changed files with 17 additions and 1 deletions

View file

@ -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 # '=~'