https://redmine.ruby-lang.org/https://redmine.ruby-lang.org/favicon.ico?17113305112011-12-07T11:47:50ZRuby Issue Tracking SystemRuby master - Bug #5719: Hash::[] can't handle 100000+ argshttps://redmine.ruby-lang.org/issues/5719?journal_id=226192011-12-07T11:47:50Ziterology (John Glass)glassj67@gmail.com
<ul></ul><p>I was able to duplicate this issue with the above code in 1.9.2-p290 It didn't matter if I ran it through IRB or from the command line.</p> Ruby master - Bug #5719: Hash::[] can't handle 100000+ argshttps://redmine.ruby-lang.org/issues/5719?journal_id=226202011-12-07T12:05:06Zgabrielg (Gabriel Gironda)gabriel@gironda.org
<ul></ul><p>It looks to be a variable argument length thing, not a Hash thing in particular.</p>
<p><a href="https://gist.github.com/5037bf83d28c2c119c44" class="external">https://gist.github.com/5037bf83d28c2c119c44</a></p>
<p>Edit: Not just variable argument length. Ruby just won't have any of your guff if you intend on passing any method a very large number of arguments.</p>
<p><a href="https://gist.github.com/d259449ff7bedef92c2e" class="external">https://gist.github.com/d259449ff7bedef92c2e</a></p>
<p>This is reasonable, I think.</p> Ruby master - Bug #5719: Hash::[] can't handle 100000+ argshttps://redmine.ruby-lang.org/issues/5719?journal_id=226212011-12-07T12:23:36Zmatz (Yukihiro Matsumoto)matz@ruby.or.jp
<ul><li><strong>ruby -v</strong> changed from <i>1.9.3-p0</i> to <i>-</i></li></ul><p>Hi,</p>
<p>In message "Re: <a href="/issues/5719">[ruby-core:41511]</a> [ruby-trunk - Bug <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Hash::[] can't handle 100000+ args (Closed)" href="https://redmine.ruby-lang.org/issues/5719">#5719</a>][Open] Hash::[] can't handle 100000+ args"<br>
on Wed, 7 Dec 2011 11:30:44 +0900, Nick Quaranto <a href="mailto:nick@quaran.to" class="email">nick@quaran.to</a> writes:</p>
<p>|I couldn't pin down an exact size for when/how this occurs, but I have code that was creating hashes just fine with Hash::[] with 300k+ arguments.</p>
<p>Unfortunately we are living in the very restricted real world. ;-)</p>
<pre><code> matz.
</code></pre> Ruby master - Bug #5719: Hash::[] can't handle 100000+ argshttps://redmine.ruby-lang.org/issues/5719?journal_id=226232011-12-07T12:26:55Zdeepfryed (Bharanee Rathna)deepfryed@gmail.com
<ul></ul><p>i shall give you four hints: stack, heap, push, pop</p>
<p>ruby's behavior is expected.</p>
<p>you can pass Hash::[] an array instead i think.</p>
<p>Hash[[[:a, 1], [:b, 2]]] #=> {:a=>1, :b=>2}</p> Ruby master - Bug #5719: Hash::[] can't handle 100000+ argshttps://redmine.ruby-lang.org/issues/5719?journal_id=226242011-12-07T14:26:57Zduerst (Martin Dürst)duerst@it.aoyama.ac.jp
<ul></ul><p>This is related to <a href="http://redmine.ruby-lang.org/issues/982" class="external">http://redmine.ruby-lang.org/issues/982</a>. In terms of what needs to be done, it may even be "the same" bug, although 982 is about a very long array literal, and this is about a very long array created by a splash. At <a href="http://redmine.ruby-lang.org/issues/982" class="external">http://redmine.ruby-lang.org/issues/982</a>, Koichi Sasada said 「すみません,1.9.3 の後の課題とさせて下さい.」, i.e. "sorry, but let's deal with this after 1.9.3". So now may be a good time :-).</p> Ruby master - Bug #5719: Hash::[] can't handle 100000+ argshttps://redmine.ruby-lang.org/issues/5719?journal_id=241142012-02-25T13:35:04Zko1 (Koichi Sasada)
<ul><li><strong>Category</strong> set to <i>core</i></li><li><strong>Assignee</strong> set to <i>ko1 (Koichi Sasada)</i></li><li><strong>Target version</strong> set to <i>2.0.0</i></li></ul> Ruby master - Bug #5719: Hash::[] can't handle 100000+ argshttps://redmine.ruby-lang.org/issues/5719?journal_id=241192012-02-25T13:53:13Zko1 (Koichi Sasada)
<ul></ul><p>(2011/12/07 14:26), Martin Dürst wrote:</p>
<blockquote>
<p>This is related to <a href="http://redmine.ruby-lang.org/issues/982" class="external">http://redmine.ruby-lang.org/issues/982</a>. In terms of what needs to be done, it may even be "the same" bug, although 982 is about a very long array literal, and this is about a very long array created by a splash. At <a href="http://redmine.ruby-lang.org/issues/982" class="external">http://redmine.ruby-lang.org/issues/982</a>, Koichi Sasada said 「すみません,1.9.3 の後の課題とさせて下さい.」, i.e. "sorry, but let's deal with this after 1.9.3". So now may be a good time :-).</p>
</blockquote>
<p>Thank you. It is correct. And there are no progress on it. Sorry.<br>
Should we solve this issue as high priority?</p>
<p>--<br>
// SASADA Koichi at atdot dot net</p> Ruby master - Bug #5719: Hash::[] can't handle 100000+ argshttps://redmine.ruby-lang.org/issues/5719?journal_id=242322012-02-29T13:53:08Zduerst (Martin Dürst)duerst@it.aoyama.ac.jp
<ul></ul><p>Hello Koichi,</p>
<p>On 2012/02/25 13:34, SASADA Koichi wrote:</p>
<blockquote>
<p>(2011/12/07 14:26), Martin Dürst wrote:</p>
<blockquote>
<p>This is related to <a href="http://redmine.ruby-lang.org/issues/982" class="external">http://redmine.ruby-lang.org/issues/982</a>. In terms of what needs to be done, it may even be "the same" bug, although 982 is about a very long array literal, and this is about a very long array created by a splash. At <a href="http://redmine.ruby-lang.org/issues/982" class="external">http://redmine.ruby-lang.org/issues/982</a>, Koichi Sasada said 「すみません,1.9.3 の後の課題とさせて下さい.」, i.e. "sorry, but let's deal with this after 1.9.3". So now may be a good time :-).</p>
</blockquote>
<p>Thank you. It is correct.</p>
</blockquote>
<p>Thanks for the confirmation.</p>
<blockquote>
<p>And there are no progress on it. Sorry.<br>
Should we solve this issue as high priority?</p>
</blockquote>
<p>I'm not sure "high priority" is the right word. It's always possible to<br>
work around it.</p>
<p>But it's highly annoying when somebody hits this issue. It's also highly<br>
counterintuitive: Ruby deals with Arrays of any size automatically, but<br>
then can't handle the same size in a literal.</p>
<p>So I very much think that 2.0 is a good point to get rid of this<br>
problem. I'm not sure what's involved in fixing it, but if there's<br>
something I can contribute, I'll be glad to help.</p>
<p>Regards, Martin.</p> Ruby master - Bug #5719: Hash::[] can't handle 100000+ argshttps://redmine.ruby-lang.org/issues/5719?journal_id=247942012-03-18T18:46:07Zshyouhei (Shyouhei Urabe)shyouhei@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Assigned</i></li></ul> Ruby master - Bug #5719: Hash::[] can't handle 100000+ argshttps://redmine.ruby-lang.org/issues/5719?journal_id=339182012-11-26T09:30:28Zko1 (Koichi Sasada)
<ul><li><strong>Target version</strong> changed from <i>2.0.0</i> to <i>2.6</i></li></ul> Ruby master - Bug #5719: Hash::[] can't handle 100000+ argshttps://redmine.ruby-lang.org/issues/5719?journal_id=627752017-01-31T09:18:58Zko1 (Koichi Sasada)
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/4040">Bug #4040</a>: SystemStackError with Hash[*a] for Large _a_</i> added</li></ul> Ruby master - Bug #5719: Hash::[] can't handle 100000+ argshttps://redmine.ruby-lang.org/issues/5719?journal_id=627772017-01-31T09:21:51Zko1 (Koichi Sasada)
<ul><li><strong>Status</strong> changed from <i>Assigned</i> to <i>Closed</i></li></ul><p>See <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: SystemStackError with Hash[*a] for Large _a_ (Closed)" href="https://redmine.ruby-lang.org/issues/4040">#4040</a> and close this ticket.</p>