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

strange take_while behavior on 1.7.19 #3178

Closed
marshall-lee opened this issue Jul 24, 2015 · 1 comment
Closed

strange take_while behavior on 1.7.19 #3178

marshall-lee opened this issue Jul 24, 2015 · 1 comment
Assignees

Comments

@marshall-lee
Copy link

MRI:

1.9.3-p551 :001 >  [{}].to_enum.take_while(&:empty?)
 => [{}] 
1.9.3-p551 :002 >  [{}].to_enum.take_while { |h| h.empty? }
 => [{}] 

JRuby:

jruby-1.7.19 :001 > [{}].to_enum.take_while { |h| h.empty? }
 => [{}] 
jruby-1.7.19 :002 > [{}].to_enum.take_while(&:empty?)
 => [nil] 

Why [nil]?

@donv
Copy link
Member

donv commented Jul 25, 2015

Hi @marshall-lee !

This is a bug and has been fixed in JRuby 1.7.21. Verified just now 😄

#2907

@donv donv closed this as completed Jul 25, 2015
@donv donv added this to the Invalid or Duplicate milestone Jul 25, 2015
@donv donv self-assigned this Jul 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants