mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
214cbdc943
commit
f9cbf0e89f
2 changed files with 8 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
Fri Aug 9 10:53:57 2013 Kazuki Tsujimoto <kazuki@callcc.net>
|
||||||
|
|
||||||
|
* time.c (get_timeval, get_new_timeval): use rb_obj_class()
|
||||||
|
instead of CLASS_OF() because CLASS_OF() may return
|
||||||
|
a singleton class.
|
||||||
|
|
||||||
Fri Aug 9 10:42:11 2013 Kazuki Tsujimoto <kazuki@callcc.net>
|
Fri Aug 9 10:42:11 2013 Kazuki Tsujimoto <kazuki@callcc.net>
|
||||||
|
|
||||||
* vm_insnhelper.c (vm_invoke_block): returning from lambda proc
|
* vm_insnhelper.c (vm_invoke_block): returning from lambda proc
|
||||||
|
|
4
time.c
4
time.c
|
@ -1817,7 +1817,7 @@ get_timeval(VALUE obj)
|
||||||
struct time_object *tobj;
|
struct time_object *tobj;
|
||||||
TypedData_Get_Struct(obj, struct time_object, &time_data_type, tobj);
|
TypedData_Get_Struct(obj, struct time_object, &time_data_type, tobj);
|
||||||
if (!TIME_INIT_P(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;
|
return tobj;
|
||||||
}
|
}
|
||||||
|
@ -1828,7 +1828,7 @@ get_new_timeval(VALUE obj)
|
||||||
struct time_object *tobj;
|
struct time_object *tobj;
|
||||||
TypedData_Get_Struct(obj, struct time_object, &time_data_type, tobj);
|
TypedData_Get_Struct(obj, struct time_object, &time_data_type, tobj);
|
||||||
if (TIME_INIT_P(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;
|
return tobj;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue