summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-09-02 15:13:26 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-09-02 15:13:26 +0000
commit580b004abe25e979e875a99189167b69eb81e09b (patch)
treec6aa80996c0ae843c7949bf164ae0a0b12646b70
parent27dfa49c1a559c71b68d197eef1007456a77c7ea (diff)
downloadruby-580b004abe25e979e875a99189167b69eb81e09b.tar.gz
ruby-580b004abe25e979e875a99189167b69eb81e09b.tar.xz
ruby-580b004abe25e979e875a99189167b69eb81e09b.zip
* string.c (str_to_id): a bug caused by premature optimization.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@10836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--string.c2
2 files changed, 4 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index da69b4cf0..9768ae74b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Sat Sep 2 23:59:37 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * string.c (str_to_id): a bug caused by premature optimization.
+
Sat Sep 2 23:53:28 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
* object.c (Init_Object): move symbol related code to string.c
diff --git a/string.c b/string.c
index 8bb315891..8c167faa9 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));
}