* vm_insnhelper.c (vm_check_if_namespace): guard temporary object
from GC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
84b96e1be4
commit
e3cc834486
@ -1,3 +1,8 @@
|
|||||||
|
Sat Feb 19 22:37:42 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
|
||||||
|
|
||||||
|
* vm_insnhelper.c (vm_check_if_namespace): guard temporary object
|
||||||
|
from GC.
|
||||||
|
|
||||||
Sat Feb 19 06:36:27 2011 Aaron Patterson <aaron@tenderlovemaking.com>
|
Sat Feb 19 06:36:27 2011 Aaron Patterson <aaron@tenderlovemaking.com>
|
||||||
|
|
||||||
* lib/test/unit.rb: partial revert of r30849. [ruby-core:32864]
|
* lib/test/unit.rb: partial revert of r30849. [ruby-core:32864]
|
||||||
|
@ -1135,13 +1135,15 @@ vm_get_const_base(const rb_iseq_t *iseq, const VALUE *lfp, const VALUE *dfp)
|
|||||||
static inline void
|
static inline void
|
||||||
vm_check_if_namespace(VALUE klass)
|
vm_check_if_namespace(VALUE klass)
|
||||||
{
|
{
|
||||||
|
VALUE str;
|
||||||
switch (TYPE(klass)) {
|
switch (TYPE(klass)) {
|
||||||
case T_CLASS:
|
case T_CLASS:
|
||||||
case T_MODULE:
|
case T_MODULE:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
str = rb_inspect(klass);
|
||||||
rb_raise(rb_eTypeError, "%s is not a class/module",
|
rb_raise(rb_eTypeError, "%s is not a class/module",
|
||||||
RSTRING_PTR(rb_inspect(klass)));
|
RSTRING_PTR(RB_GC_GUARD(str)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user