diff --git a/ChangeLog b/ChangeLog index d063d0904a..fd54c360fe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -53,6 +53,11 @@ Wed May 20 18:34:30 2009 Nobuyoshi Nakada * enumerator.c (inspect_enumerator): should use long. +Wed May 20 09:18:44 2009 Yukihiro Matsumoto + + * string.c (rb_str_count): optimized for 1byte string count by + avoiding tr_setup_table(). + Wed May 20 06:25:29 2009 Yukihiro Matsumoto * encoding.c (rb_enc_fast_mbclen): faster mbclen for strings known diff --git a/string.c b/string.c index 405500b1d2..b714864474 100644 --- a/string.c +++ b/string.c @@ -5380,19 +5380,31 @@ rb_str_count(int argc, VALUE *argv, VALUE str) rb_raise(rb_eArgError, "wrong number of arguments"); } for (i=0; i