1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

array.c: swap volatile for RB_GC_GUARD

* array.c (ary_recycle_hash): add RB_GC_GUARD
  (rb_ary_diff): remove volatile
  [Bug #10369]

The RB_GC_GUARD seems needed for most of the ary_recycle_hash
functions anyways.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
normal 2014-10-12 21:53:01 +00:00
parent 6769d5d5ac
commit eb5147779d
2 changed files with 8 additions and 1 deletions

View file

@ -1,3 +1,9 @@
Mon Oct 13 06:52:09 2014 Eric Wong <e@80x24.org>
* array.c (ary_recycle_hash): add RB_GC_GUARD
(rb_ary_diff): remove volatile
[Bug #10369]
Mon Oct 13 03:20:23 2014 Zachary Scott <e@zzak.io>
* ext/date/date_core.c: [DOC] Clean up whitespace, examples, and typos

View file

@ -3986,6 +3986,7 @@ ary_recycle_hash(VALUE hash)
RHASH(hash)->ntbl = 0;
st_free_table(tbl);
}
RB_GC_GUARD(hash);
}
/*
@ -4009,7 +4010,7 @@ static VALUE
rb_ary_diff(VALUE ary1, VALUE ary2)
{
VALUE ary3;
volatile VALUE hash;
VALUE hash;
long i;
hash = ary_make_hash(to_ary(ary2));