diff --git a/ChangeLog b/ChangeLog index 11bd451833..896e278b4e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Jun 12 13:36:54 2008 Tanaka Akira + + * include/ruby/ruby.h (rb_intern): use rb_intern2 with strlen for + constant symbols to optimize strlen. + Thu Jun 12 08:47:51 2008 Yukihiro Matsumoto * io.c (read_all): should use io_read_encoding(), not diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index 5bae5d392d..d2b9f4c8b3 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -768,7 +768,7 @@ VALUE rb_id2str(ID); { \ static ID rb_intern_id_cache; \ if (!rb_intern_id_cache) \ - rb_intern_id_cache = (rb_intern)(str); \ + rb_intern_id_cache = rb_intern2(str, strlen(str)); \ result rb_intern_id_cache; \ } #define CONST_ID(var, str) \