From 6e0fed271c1d2e6f2b13b99d89d43e7d00e81472 Mon Sep 17 00:00:00 2001 From: matz Date: Fri, 2 Feb 2007 13:19:44 +0000 Subject: * 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 --- compile.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'compile.c') 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; } } -- cgit v1.2.3