summaryrefslogtreecommitdiff
path: root/vm_method.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-08-01 22:29:26 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-08-01 22:29:26 +0000
commitd28d075cc1a2907e2b9db0d37b52b1711c9097c3 (patch)
treeaf032fd69bfadd5be15bc1fb2c2015035ccec244 /vm_method.c
parent61b624d149204c2b1c17a2852d088b2eb2aa010b (diff)
RB_TYPE_P BUILTIN_TYPE
* string.c, vm_insnhelper.c, vm_method.c: use RB_TYPE_P() and BUILTIN_TYPE() if possible. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_method.c')
-rw-r--r--vm_method.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/vm_method.c b/vm_method.c
index af7c99a95f..f344355f4f 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -653,9 +653,7 @@ rb_undef(VALUE klass, ID id)
if (FL_TEST(c, FL_SINGLETON)) {
VALUE obj = rb_ivar_get(klass, attached);
- switch (TYPE(obj)) {
- case T_MODULE:
- case T_CLASS:
+ if (RB_TYPE_P(obj, T_MODULE) || RB_TYPE_P(obj, T_CLASS)) {
c = obj;
s0 = "";
}