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 | fd22933c3d60c1fca8300ec6de920be34a0338df (patch) | |
tree | 791820116e48e6b69fe1f39d358374d126a4f99b /compile.c | |
parent | 12aeeeaa3607a6e4696990986f7d76a847cc8a45 (diff) | |
download | ruby-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.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; } } |