From d064c0bf13b47356757e4dc9f678a2f0ff84e624 Mon Sep 17 00:00:00 2001 From: matz Date: Sat, 2 Sep 2006 15:13:26 +0000 Subject: * string.c (str_to_id): a bug caused by premature optimization. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ string.c | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index da69b4cf0a..9768ae74bc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sat Sep 2 23:59:37 2006 Yukihiro Matsumoto + + * string.c (str_to_id): a bug caused by premature optimization. + Sat Sep 2 23:53:28 2006 Yukihiro Matsumoto * object.c (Init_Object): move symbol related code to string.c diff --git a/string.c b/string.c index 8bb3158917..8c167faa93 100644 --- a/string.c +++ b/string.c @@ -4538,8 +4538,6 @@ str_to_id(VALUE str) if (!RSTRING_PTR(str) || RSTRING_LEN(str) == 0) { rb_raise(rb_eArgError, "empty symbol string"); } - if (RBASIC(str)->klass == rb_cSymbol) - return str; return rb_intern2(RSTRING_PTR(str), RSTRING_LEN(str)); } -- cgit v1.2.3