summaryrefslogtreecommitdiff
path: root/time.c
diff options
context:
space:
mode:
authorktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-09 01:56:51 (GMT)
committerktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-09 01:56:51 (GMT)
commitf9cbf0e89f92f149aed9f41b81d72b9d76a9b14a (patch)
treed3674cf5a17deec86e303df797a758f1ded63337 /time.c
parent214cbdc9434b6ba967c00179473666732258c913 (diff)
* time.c (get_timeval, get_new_timeval): use rb_obj_class()
instead of CLASS_OF() because CLASS_OF() may return a singleton class. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'time.c')
-rw-r--r--time.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/time.c b/time.c
index 20476e9..68a6b7e 100644
--- a/time.c
+++ b/time.c
@@ -1817,7 +1817,7 @@ get_timeval(VALUE obj)
struct time_object *tobj;
TypedData_Get_Struct(obj, struct time_object, &time_data_type, tobj);
if (!TIME_INIT_P(tobj)) {
- rb_raise(rb_eTypeError, "uninitialized %"PRIsVALUE, CLASS_OF(obj));
+ rb_raise(rb_eTypeError, "uninitialized %"PRIsVALUE, rb_obj_class(obj));
}
return tobj;
}
@@ -1828,7 +1828,7 @@ get_new_timeval(VALUE obj)
struct time_object *tobj;
TypedData_Get_Struct(obj, struct time_object, &time_data_type, tobj);
if (TIME_INIT_P(tobj)) {
- rb_raise(rb_eTypeError, "already initialized %"PRIsVALUE, CLASS_OF(obj));
+ rb_raise(rb_eTypeError, "already initialized %"PRIsVALUE, rb_obj_class(obj));
}
return tobj;
}