1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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:
nagachika 2011-02-19 13:41:19 +00:00
parent 84b96e1be4
commit e3cc834486
2 changed files with 8 additions and 1 deletions

View file

@ -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>
* lib/test/unit.rb: partial revert of r30849. [ruby-core:32864]

View file

@ -1135,13 +1135,15 @@ vm_get_const_base(const rb_iseq_t *iseq, const VALUE *lfp, const VALUE *dfp)
static inline void
vm_check_if_namespace(VALUE klass)
{
VALUE str;
switch (TYPE(klass)) {
case T_CLASS:
case T_MODULE:
break;
default:
str = rb_inspect(klass);
rb_raise(rb_eTypeError, "%s is not a class/module",
RSTRING_PTR(rb_inspect(klass)));
RSTRING_PTR(RB_GC_GUARD(str)));
}
}