* vm_insnhelper.c (unknown_keyword_error): add GC guard to prevent
intermediate object from GC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2828593e1a
commit
0d9710692e
@ -1,3 +1,8 @@
|
|||||||
|
Wed Dec 28 02:08:04 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
|
||||||
|
|
||||||
|
* vm_insnhelper.c (unknown_keyword_error): add GC guard to prevent
|
||||||
|
intermediate object from GC.
|
||||||
|
|
||||||
Tue Dec 27 22:34:54 2011 Shota Fukumori <sorah@tubusu.net>
|
Tue Dec 27 22:34:54 2011 Shota Fukumori <sorah@tubusu.net>
|
||||||
|
|
||||||
* lib/test/unit.rb (Worker#close): "closing IO if IO is closed"
|
* lib/test/unit.rb (Worker#close): "closing IO if IO is closed"
|
||||||
|
@ -146,6 +146,7 @@ unknown_keyword_error(const rb_iseq_t *iseq, VALUE hash)
|
|||||||
if (TYPE(keys) != T_ARRAY) rb_raise(rb_eArgError, "unknown keyword");
|
if (TYPE(keys) != T_ARRAY) rb_raise(rb_eArgError, "unknown keyword");
|
||||||
msg = RARRAY_LEN(keys) == 1 ? "unknown keyword: %s" : "unknown keywords: %s";
|
msg = RARRAY_LEN(keys) == 1 ? "unknown keyword: %s" : "unknown keywords: %s";
|
||||||
keys = rb_funcall(keys, rb_intern("join"), 1, sep);
|
keys = rb_funcall(keys, rb_intern("join"), 1, sep);
|
||||||
|
RB_GC_GUARD(keys);
|
||||||
rb_raise(rb_eArgError, msg, RSTRING_PTR(keys));
|
rb_raise(rb_eArgError, msg, RSTRING_PTR(keys));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user