diff options
author | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-11-20 14:04:10 +0000 |
---|---|---|
committer | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-11-20 14:04:10 +0000 |
commit | e2aea7a2360da1e2ec335715e56cbd91f7fbbe41 (patch) | |
tree | cd5e2464e44f212d71fcc8d02a4ee06cfd70a378 /string.c | |
parent | 346b582c02933e1d28e94731b07bc771a83a544b (diff) |
* test/ruby/test_stringchar.rb (test_bang): added.
* string.c (rb_str_upcase_bang, rb_str_capitalize_bang)
(rb_str_swapcase_bang): missing rb_str_modify().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7340 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -2725,6 +2725,7 @@ rb_str_upcase_bang(str) char *s, *send; int modify = 0; + rb_str_modify(str); s = RSTRING(str)->ptr; send = s + RSTRING(str)->len; while (s < send) { if (ismbchar(*s)) { @@ -2838,6 +2839,7 @@ rb_str_capitalize_bang(str) char *s, *send; int modify = 0; + rb_str_modify(str); if (RSTRING(str)->len == 0 || !RSTRING(str)->ptr) return Qnil; s = RSTRING(str)->ptr; send = s + RSTRING(str)->len; if (ISLOWER(*s)) { @@ -2895,6 +2897,7 @@ rb_str_swapcase_bang(str) char *s, *send; int modify = 0; + rb_str_modify(str); s = RSTRING(str)->ptr; send = s + RSTRING(str)->len; while (s < send) { if (ismbchar(*s)) { |