summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-02-18 10:43:41 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-02-18 10:43:41 +0000
commitb5296022863787b9bc9ce161cf1e02d381d0b722 (patch)
treed5369f1d7f9f0545920e9cf0ad74ba38d838bae3 /hash.c
parent7c9904b29ec16ddce76fb167ab20afca4a571476 (diff)
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
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hash.c b/hash.c
index 7774aacc53..0aa433d3cb 100644
--- a/hash.c
+++ b/hash.c
@@ -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);
}