diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-09-06 12:33:45 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-09-06 12:33:45 +0000 |
commit | edd7c787adc53f70a9d2790076e4c6d77a1f5324 (patch) | |
tree | 0b19582f07ef27790bde97603bd271efb88bcb35 /encoding.c | |
parent | 629b1e4324ecfbdb9e953f2a0da74a833786e1e9 (diff) | |
download | ruby-edd7c787adc53f70a9d2790076e4c6d77a1f5324.tar.gz |
* array.c (rb_ary_cycle): typo in rdoc. a patch from Yugui
<yugui@yugui.sakura.ne.jp>. [ruby-dev:31748]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'encoding.c')
-rw-r--r-- | encoding.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/encoding.c b/encoding.c index fc0aa3b945..8b674d13ea 100644 --- a/encoding.c +++ b/encoding.c @@ -189,7 +189,7 @@ rb_enc_nth(const char *p, const char *e, int nth, rb_encoding *enc) } else { for (c=0; p<e && nth--; c++) { - int n = rb_enc_mbclen(p, enc); + int n = rb_enc_mbclen(p, e, enc); if (n == 0) return 0; p += n; @@ -208,7 +208,7 @@ rb_enc_strlen(const char *p, const char *e, rb_encoding *enc) } for (c=0; p<e; c++) { - int n = rb_enc_mbclen(p, enc); + int n = rb_enc_mbclen(p, e, enc); if (n == 0) return -1; p += n; @@ -217,9 +217,9 @@ rb_enc_strlen(const char *p, const char *e, rb_encoding *enc) } int -rb_enc_mbclen(const char *p, rb_encoding *enc) +rb_enc_mbclen(const char *p, const char *e, rb_encoding *enc) { - int n = ONIGENC_MBC_ENC_LEN(enc, (UChar*)p); + int n = ONIGENC_MBC_ENC_LEN(enc, (UChar*)p, (UChar*)e); if (n == 0) { rb_raise(rb_eArgError, "invalid mbstring sequence"); } |