diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-06-07 18:30:42 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-06-07 18:30:42 +0000 |
commit | 550532d90224db0b860a2b52e37b8db9ebb28afa (patch) | |
tree | ddcdd5bb82a2ff02760883e89a26a6c5d68e1740 | |
parent | f5534ad5b48e62d262883cf2165789ced4d06b3a (diff) | |
download | ruby-550532d90224db0b860a2b52e37b8db9ebb28afa.tar.gz |
* gc.c (rb_obj_id): trivial optimization.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | gc.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -3031,7 +3031,7 @@ rb_obj_id(VALUE obj) * 24 if 32-bit, double is 8-byte aligned * 40 if 64-bit */ - if (TYPE(obj) == T_SYMBOL) { + if (SYMBOL_P(obj)) { return (SYM2ID(obj) * sizeof(RVALUE) + (4 << 2)) | FIXNUM_FLAG; } if (SPECIAL_CONST_P(obj)) { |