mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* string.c (rb_str_index): if t == s + pos, the character beginning
from s + pos is valid. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
eb5789e2ac
commit
f55b10c001
3 changed files with 9 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
|||
Mon Mar 10 02:08:21 2008 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* string.c (rb_str_index): if t == s + pos, the character beginning
|
||||
from s + pos is valid.
|
||||
|
||||
Sun Mar 9 13:51:21 2008 Eric Hodel <drbrain@segment7.net>
|
||||
|
||||
* lib/rdoc/generator.rb: Restore missing line to #params. Patch by
|
||||
|
|
2
string.c
2
string.c
|
@ -2074,7 +2074,7 @@ rb_str_index(VALUE str, VALUE sub, long offset)
|
|||
pos = rb_memsearch(sptr, slen, s, len);
|
||||
if (pos < 0) return pos;
|
||||
t = rb_enc_right_char_head(s, s+pos, enc);
|
||||
if (t == s) break;
|
||||
if (t == s + pos) break;
|
||||
if ((len -= t - s) <= 0) return -1;
|
||||
offset += t - s;
|
||||
s = t;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#define RUBY_VERSION "1.9.0"
|
||||
#define RUBY_RELEASE_DATE "2008-03-08"
|
||||
#define RUBY_RELEASE_DATE "2008-03-10"
|
||||
#define RUBY_VERSION_CODE 190
|
||||
#define RUBY_RELEASE_CODE 20080308
|
||||
#define RUBY_RELEASE_CODE 20080310
|
||||
#define RUBY_PATCHLEVEL 0
|
||||
|
||||
#define RUBY_VERSION_MAJOR 1
|
||||
|
@ -9,7 +9,7 @@
|
|||
#define RUBY_VERSION_TEENY 0
|
||||
#define RUBY_RELEASE_YEAR 2008
|
||||
#define RUBY_RELEASE_MONTH 3
|
||||
#define RUBY_RELEASE_DAY 8
|
||||
#define RUBY_RELEASE_DAY 10
|
||||
|
||||
#ifdef RUBY_EXTERN
|
||||
RUBY_EXTERN const char ruby_version[];
|
||||
|
|
Loading…
Add table
Reference in a new issue