merges r30683 and r30684 from trunk into ruby_1_9_2.

--
	* hash.c (rb_hash_fetch_m): add GC guard to prevent intermediate
	  variable from GC.
--
	* re.c (rb_reg_raise): add GC guard to prevent intermediate
	  variable from GC.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
yugui 2011-02-18 10:43:41 +00:00
parent 7c9904b29e
commit b529602286
4 changed files with 13 additions and 3 deletions

View file

@ -1,3 +1,13 @@
Fri Jan 28 02:37:18 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* re.c (rb_reg_raise): add GC guard to prevent intermediate
variable from GC.
Fri Jan 28 02:35:41 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* hash.c (rb_hash_fetch_m): add GC guard to prevent intermediate
variable from GC.
Wed Jan 26 22:57:30 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
* class.c (clone_method): add GC guard to prevent intermediate

2
hash.c
View file

@ -570,7 +570,7 @@ rb_hash_fetch_m(int argc, VALUE *argv, VALUE hash)
if (!RHASH(hash)->ntbl || !st_lookup(RHASH(hash)->ntbl, key, &val)) {
if (block_given) return rb_yield(key);
if (argc == 1) {
VALUE desc = rb_protect(rb_inspect, key, 0);
volatile VALUE desc = rb_protect(rb_inspect, key, 0);
if (NIL_P(desc) || RSTRING_LEN(desc) > 65) {
desc = rb_any_to_s(key);
}

2
re.c
View file

@ -587,7 +587,7 @@ rb_reg_to_s(VALUE re)
static void
rb_reg_raise(const char *s, long len, const char *err, VALUE re)
{
VALUE desc = rb_reg_desc(s, len, re);
volatile VALUE desc = rb_reg_desc(s, len, re);
rb_raise(rb_eRegexpError, "%s: %s", err, RSTRING_PTR(desc));
}

View file

@ -1,5 +1,5 @@
#define RUBY_VERSION "1.9.2"
#define RUBY_PATCHLEVEL 176
#define RUBY_PATCHLEVEL 177
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 9
#define RUBY_VERSION_TEENY 1