summaryrefslogtreecommitdiffstats
path: root/compile.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-02-02 13:19:44 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-02-02 13:19:44 +0000
commitfd22933c3d60c1fca8300ec6de920be34a0338df (patch)
tree791820116e48e6b69fe1f39d358374d126a4f99b /compile.c
parent12aeeeaa3607a6e4696990986f7d76a847cc8a45 (diff)
downloadruby-fd22933c3d60c1fca8300ec6de920be34a0338df.tar.gz
ruby-fd22933c3d60c1fca8300ec6de920be34a0338df.tar.xz
ruby-fd22933c3d60c1fca8300ec6de920be34a0338df.zip
* ruby.h (SYMBOL_P): make Symbol immediate again for performance.
* string.c: redesign symbol methods. * parse.y (rb_id2str): store Strings for operator symbols. [ruby-dev:30235] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/compile.c b/compile.c
index c8ddb2f80..dc2765e92 100644
--- a/compile.c
+++ b/compile.c
@@ -2065,8 +2065,7 @@ case_when_optimizable_literal(NODE * node)
{
if (nd_type(node) == NODE_LIT) {
VALUE v = node->nd_lit;
- VALUE klass = CLASS_OF(v);
- if (klass == rb_cSymbol || rb_obj_is_kind_of(v, rb_cNumeric)) {
+ if (SYMBOL_P(v) || rb_obj_is_kind_of(v, rb_cNumeric)) {
return v;
}
}