[#65451] [ruby-trunk - Feature #10333] [PATCH 3/1] optimize: "yoda literal" == string — ko1@...
Issue #10333 has been updated by Koichi Sasada.
ko1@atdot.net wrote:
Eric Wong <normalperson@yhbt.net> wrote:
Eric Wong <normalperson@yhbt.net> wrote:
On 2014/10/09 11:04, Eric Wong wrote:
SASADA Koichi <ko1@atdot.net> wrote:
[#65453] [ruby-trunk - Feature #10328] [PATCH] make OPT_SUPPORT_JOKE a proper VM option — ko1@...
Issue #10328 has been updated by Koichi Sasada.
[#65559] is there a name for this? — Xavier Noria <fxn@...>
When describing stuff about constants (working in their guide), you often
On 2014/10/09 20:41, Xavier Noria wrote:
On Thu, Oct 9, 2014 at 1:59 PM, Nobuyoshi Nakada <nobu@ruby-lang.org> wrote:
[#65566] [ruby-trunk - Feature #10351] [Open] [PATCH] prevent CVE-2014-6277 — shyouhei@...
Issue #10351 has been reported by Shyouhei Urabe.
[#65741] Re: [ruby-cvs:55121] normal:r47971 (trunk): test/ruby/test_rubyoptions.rb: fix race — Nobuyoshi Nakada <nobu@...>
On 2014/10/16 10:10, normal@ruby-lang.org wrote:
Nobuyoshi Nakada <nobu@ruby-lang.org> wrote:
2014-10-16 12:48 GMT+09:00 Eric Wong <normalperson@yhbt.net>:
[#65753] [ruby-trunk - Feature #10333] [PATCH 3/1] optimize: "yoda literal" == string — ko1@...
Issue #10333 has been updated by Koichi Sasada.
[#65818] [ruby-trunk - Feature #10351] [PATCH] prevent CVE-2014-6277 — shyouhei@...
Issue #10351 has been updated by Shyouhei Urabe.
[ruby-core:65712] [ruby-trunk - Bug #10387] [Open] Overwriting an array variable doesn't release referenced objects
Issue #10387 has been reported by Andrew Vit.
----------------------------------------
Bug #10387: Overwriting an array variable doesn't release referenced objects
https://bugs.ruby-lang.org/issues/10387
* Author: Andrew Vit
* Status: Open
* Priority: Normal
* Assignee:
* Category: core
* Target version:
* ruby -v: ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_64-darwin13.0]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
I narrowed down the following, but I'm not sure if the problem is mine or a bug:
~~~
require 'objspace'
GC.start
begin
threads = []
1000.times do
threads << Thread.new { Random.new(10) }
end
threads.each &:join
threads = [] # threads.clear
end
GC.start
puts ObjectSpace.count_tdata_objects
~~~
If I overwrite the threads variable with an empty array or nil, then 1000 Threads and 1000 Random objects remain in the heap.
However, if I run Array#clear to release the threads, then everything is released correctly.
I don't think this issue is related to threads necessarily, I was able to make it happen with regular objects, but it looks like you have to run a method on each object in the array, e.g.
~~~
objects = []
1000.times do
objects << Random.new(10)
end
objects.each &:rand # Random objects remain in memory with this line
objects = []
~~~
--
https://bugs.ruby-lang.org/