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 | 5a2465db313df5f50cf7e4945afa70cc93322718 (patch) | |
| tree | cd5e2464e44f212d71fcc8d02a4ee06cfd70a378 /string.c | |
| parent | a5ac189f02bcec7b1991b11a99c8330dcab36a62 (diff) | |
| download | ruby-5a2465db313df5f50cf7e4945afa70cc93322718.tar.gz ruby-5a2465db313df5f50cf7e4945afa70cc93322718.tar.xz ruby-5a2465db313df5f50cf7e4945afa70cc93322718.zip | |
* 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: http://svn.ruby-lang.org/repos/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)) { |
