diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-01-04 05:24:39 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-01-04 05:24:39 +0000 |
commit | 460528289ab3b22f373c00a8494f65e5c3dcfdde (patch) | |
tree | 05892a275bee3df41e2645da9f3c1fc7d6f04118 /string.c | |
parent | 79e0379a7573e998d52ea42242ea0cc96fa81738 (diff) | |
download | ruby-460528289ab3b22f373c00a8494f65e5c3dcfdde.tar.gz |
* string.c (str_nth_len): count ascii-only run at the end. this
bug appears only when single-byte-optimization is disabled due
to unknown coderange. [ruby-core:41896] [Bug #5836]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -1483,6 +1483,7 @@ str_nth_len(const char *p, const char *e, long *nthp, rb_encoding *enc) if (ISASCII(*p)) { p2 = search_nonascii(p, e2); if (!p2) { + nth -= e2 - p; *nthp = nth; return (char *)e2; } |