Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combination of Array#zip and Array#cycle result in OOM #482

Closed
isaiah opened this Issue Jan 7, 2013 · 3 comments

Comments

Projects
None yet
3 participants
@isaiah
Copy link
Contributor

commented Jan 7, 2013

irb(main):001:0> [1,2].zip([0].cycle)
Java::JavaLang::OutOfMemoryError: Java heap space

while enumerator version

[1,2].to_enum.zip([0].cycle)

works fine.

@BanzaiMan

This comment has been minimized.

Copy link
Member

commented Jan 7, 2013

[1,2].to_enum.zip([0].cycle)

results in OOM for me.

@nirvdrum

This comment has been minimized.

Copy link
Contributor

commented Jan 7, 2013

The to_enum variant returns very quickly for me. JRuby 1.7.2. Java(TM) SE Runtime Environment (build 1.7.0_10-b18)

@BanzaiMan

This comment has been minimized.

Copy link
Member

commented Jan 7, 2013

Oops. I forgot #to_enum somehow. I apologize for the noise there.

isaiah pushed a commit to isaiah/jruby that referenced this issue Jan 7, 2013

isaiah pushed a commit to isaiah/jruby that referenced this issue Jan 8, 2013

isaiah pushed a commit to isaiah/jruby that referenced this issue Jan 9, 2013

@BanzaiMan BanzaiMan closed this in b0a6a92 Jan 11, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.