summaryrefslogtreecommitdiff
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-09-29 11:07:45 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-09-29 11:07:45 +0000
commit8e6e8e628888aa251f771ce8b3fe30a6b41a7a0e (patch)
treee531ed455f2ffb110e9a16de2161b3865a19d582 /vm_insnhelper.c
parent68f97d7851481e11ce90bb349345dc4caed00cf7 (diff)
* use RB_TYPE_P which is optimized for constant types, instead of
comparison with TYPE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index d97ac87a2a..420e67de05 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -1282,7 +1282,7 @@ static VALUE
vm_getivar(VALUE obj, ID id, IC ic)
{
#if USE_IC_FOR_IVAR
- if (TYPE(obj) == T_OBJECT) {
+ if (RB_TYPE_P(obj, T_OBJECT)) {
VALUE val = Qundef;
VALUE klass = RBASIC(obj)->klass;
@@ -1337,7 +1337,7 @@ vm_setivar(VALUE obj, ID id, VALUE val, IC ic)
rb_check_frozen(obj);
- if (TYPE(obj) == T_OBJECT) {
+ if (RB_TYPE_P(obj, T_OBJECT)) {
VALUE klass = RBASIC(obj)->klass;
st_data_t index;
@@ -1645,7 +1645,7 @@ vm_expandarray(rb_control_frame_t *cfp, VALUE ary, rb_num_t num, int flag)
volatile VALUE tmp_ary;
rb_num_t len;
- if (TYPE(ary) != T_ARRAY) {
+ if (!RB_TYPE_P(ary, T_ARRAY)) {
ary = rb_ary_to_ary(ary);
}