diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-29 12:22:01 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-29 12:22:01 +0000 |
commit | e878df745ca89ecdb07090ad2bb99fd433dfc3a3 (patch) | |
tree | f19ee613be1c68c4167b2b34415543bfa5c4e4a5 /eval.c | |
parent | eb56c1084d57e59b9daab78b22812660d890a354 (diff) |
use RB_TYPE_P
* enumerator.c (enumerator_initialize), eval.c (rb_using_refinement),
(add_activated_refinement), numeric.c (num_interval_step_size),
parse.y (arg, match_op_gen, cond0), range.c (range_bsearch),
vm_insnhelper.c (vm_get_iclass): use RB_TYPE_P() to optimize.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1066,7 +1066,7 @@ rb_using_refinement(NODE *cref, VALUE klass, VALUE module) } if (!NIL_P(c = rb_hash_lookup(cref->nd_refinements, klass))) { superclass = c; - while (c && TYPE(c) == T_ICLASS) { + while (c && RB_TYPE_P(c, T_ICLASS)) { if (RBASIC(c)->klass == module) { /* already used refinement */ return; @@ -1127,7 +1127,7 @@ add_activated_refinement(VALUE activated_refinements, if (!NIL_P(c = rb_hash_lookup(activated_refinements, klass))) { superclass = c; - while (c && TYPE(c) == T_ICLASS) { + while (c && RB_TYPE_P(c, T_ICLASS)) { if (RBASIC(c)->klass == refinement) { /* already used refinement */ return; |