mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* array.c: don't recycle shared-array while sort!.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
331cd4eed6
commit
b29f3640e9
2 changed files with 5 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
Sat Oct 18 00:47:51 2008 wanabe <s.wanabe@gmail.com>
|
||||
|
||||
* array.c: don't recycle shared-array while sort!.
|
||||
|
||||
Fri Oct 17 22:04:38 2008 wanabe <s.wanabe@gmail.com>
|
||||
|
||||
* array.c: recycle shared-array when it isn't referenced.
|
||||
|
|
2
array.c
2
array.c
|
@ -177,7 +177,7 @@ rb_ary_decrement_share(VALUE shared)
|
|||
{
|
||||
if (shared) {
|
||||
int num = ARY_SHARED_NUM(shared) - 1;
|
||||
if (num == 0) {
|
||||
if (num == 0 && RBASIC(shared)->klass) {
|
||||
rb_ary_free(shared);
|
||||
rb_gc_force_recycle(shared);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue