ruby-changes:18875
From: yugui <ko1@a...>
Date: Fri, 18 Feb 2011 19:44:31 +0900 (JST)
Subject: [ruby-changes:18875] Ruby:r30899 (ruby_1_9_2): merges r30683 and r30684 from trunk into ruby_1_9_2.
yugui 2011-02-18 19:43:41 +0900 (Fri, 18 Feb 2011) New Revision: 30899 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=30899 Log: 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. Modified files: branches/ruby_1_9_2/ChangeLog branches/ruby_1_9_2/hash.c branches/ruby_1_9_2/re.c branches/ruby_1_9_2/version.h Index: ruby_1_9_2/ChangeLog =================================================================== --- ruby_1_9_2/ChangeLog (revision 30898) +++ ruby_1_9_2/ChangeLog (revision 30899) @@ -1,3 +1,13 @@ +Fri Jan 28 02:37:18 2011 KOSAKI Motohiro <kosaki.motohiro@g...> + + * 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@g...> + + * 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@g...> * class.c (clone_method): add GC guard to prevent intermediate Index: ruby_1_9_2/re.c =================================================================== --- ruby_1_9_2/re.c (revision 30898) +++ ruby_1_9_2/re.c (revision 30899) @@ -587,7 +587,7 @@ 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)); } Index: ruby_1_9_2/hash.c =================================================================== --- ruby_1_9_2/hash.c (revision 30898) +++ ruby_1_9_2/hash.c (revision 30899) @@ -570,7 +570,7 @@ 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); } Index: ruby_1_9_2/version.h =================================================================== --- ruby_1_9_2/version.h (revision 30898) +++ ruby_1_9_2/version.h (revision 30899) @@ -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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/