* insns.def(setconstant, toregexp): fix to mark object correctly.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ko1 2007-06-15 06:55:36 +00:00
parent afb1901848
commit 5cbefb96b9
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,7 @@
Fri Jun 15 15:55:55 2007 Koichi Sasada <ko1@atdot.net>
* insns.def(setconstant, toregexp): fix to mark object correctly.
Fri Jun 15 13:24:18 2007 Koichi Sasada <ko1@atdot.net> Fri Jun 15 13:24:18 2007 Koichi Sasada <ko1@atdot.net>
* hash.c: exchange semantics of Hash#each and Hash#each_pair. * hash.c: exchange semantics of Hash#each and Hash#each_pair.

View File

@ -285,9 +285,11 @@ setconstant
case T_CLASS: case T_CLASS:
case T_MODULE: case T_MODULE:
break; break;
default: default: {
volatile VALUE tmp = rb_obj_as_string(klass);
rb_raise(rb_eTypeError, "%s is not a class/module", rb_raise(rb_eTypeError, "%s is not a class/module",
RSTRING_PTR(rb_obj_as_string(klass))); RSTRING_PTR(tmp));
}
} }
rb_const_set(klass, id, val); rb_const_set(klass, id, val);
@ -446,6 +448,7 @@ toregexp
(VALUE str) (VALUE str)
(VALUE val) (VALUE val)
{ {
volatile VALUE tmp = str;
val = rb_reg_new(RSTRING_PTR(str), RSTRING_LEN(str), flag); val = rb_reg_new(RSTRING_PTR(str), RSTRING_LEN(str), flag);
} }