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 | 7ae21b1db0303625ccb7f460619e2f68a248d2ab (patch) | |
tree | 0b19582f07ef27790bde97603bd271efb88bcb35 /encoding.c | |
parent | 600b64dd3af65d9b87f3d7fe634106564f0abb04 (diff) | |
download | ruby-7ae21b1db0303625ccb7f460619e2f68a248d2ab.tar.gz ruby-7ae21b1db0303625ccb7f460619e2f68a248d2ab.tar.xz ruby-7ae21b1db0303625ccb7f460619e2f68a248d2ab.zip |
* array.c (rb_ary_cycle): typo in rdoc. a patch from Yugui
<yugui@yugui.sakura.ne.jp>. [ruby-dev:31748]
git-svn-id: http://svn.ruby-lang.org/repos/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 fc0aa3b94..8b674d13e 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"); } |