diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-02-02 13:19:44 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-02-02 13:19:44 +0000 |
commit | 6e0fed271c1d2e6f2b13b99d89d43e7d00e81472 (patch) | |
tree | 791820116e48e6b69fe1f39d358374d126a4f99b /compile.c | |
parent | 0abfa1c532bfa73eccdb5e8f05957c0935f5b1d9 (diff) | |
download | ruby-6e0fed271c1d2e6f2b13b99d89d43e7d00e81472.tar.gz |
* 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.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -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; } } |