From 5df88436142a9ae289fff2fe4767601df5ddedf1 Mon Sep 17 00:00:00 2001 From: akr Date: Thu, 12 Jun 2008 04:46:16 +0000 Subject: * include/ruby/ruby.h (rb_intern): use rb_intern2 with strlen for constant symbols to optimize strlen. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- include/ruby/ruby.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/ruby') diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index 5bae5d392..d2b9f4c8b 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) \ -- cgit