diff options
| author | Yukihiro Matsumoto <[email protected]> | 2012-05-31 16:14:50 +0900 |
|---|---|---|
| committer | Yukihiro Matsumoto <[email protected]> | 2012-05-31 16:14:50 +0900 |
| commit | c7f540ed6721b735815af8eee5a69b22b6142b50 (patch) | |
| tree | a694d8018eeaaf277b6826ef244fde434875f6b6 | |
| parent | 86697ca7b47ee826598c30948549651e662f09e3 (diff) | |
| download | mruby-c7f540ed6721b735815af8eee5a69b22b6142b50.tar.gz mruby-c7f540ed6721b735815af8eee5a69b22b6142b50.zip | |
reimplement String#upcase
| -rw-r--r-- | src/string.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/string.c b/src/string.c index c9fac896d..c000a9d7c 100644 --- a/src/string.c +++ b/src/string.c @@ -2583,7 +2583,8 @@ mrb_str_upcase_bang(mrb_state *mrb, mrb_value str) char *s, *send; int modify = 0; - s = RSTRING(str)->buf; send = s + RSTRING(str)->len; + s = RSTRING_PTR(str); + send = RSTRING_END(str); while (s < send) { if (ISLOWER(*s)) { *s = toupper(*s); |
