summaryrefslogtreecommitdiff
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
commit6e0fed271c1d2e6f2b13b99d89d43e7d00e81472 (patch)
tree791820116e48e6b69fe1f39d358374d126a4f99b /compile.c
parent0abfa1c532bfa73eccdb5e8f05957c0935f5b1d9 (diff)
* 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: svn+ssh://ci.ruby-lang.org/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 c8ddb2f80f..dc2765e92d 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;
}
}