Issue #5719 has been updated by Koichi Sasada.

Status changed from Assigned to Closed

See #4040 and close this ticket.

----------------------------------------
Bug #5719: Hash::[] can't handle 100000+ args
https://bugs.ruby-lang.org/issues/5719#change-62777

* Author: Nick Quaranto
* Status: Closed
* Priority: Normal
* Assignee: Koichi Sasada
* Target version: next minor
* ruby -v: -
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
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.

irb(main):056:0> (0...140000).map { |n| [:a, n] }.tap { |a| Hash[*a] }.size
SystemStackError: stack level too deep
	from /Users/qrush/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/irb/workspace.rb:80
Maybe IRB bug!
irb(main):057:0> (0...130000).map { |n| [:a, n] }.tap { |a| Hash[*a] }.size
=> 130000




-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>