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

Hash#take_while wrong behavior in 1.7.19 #2907

Closed
dzjuck opened this issue May 5, 2015 · 4 comments
Closed

Hash#take_while wrong behavior in 1.7.19 #2907

dzjuck opened this issue May 5, 2015 · 4 comments
Assignees
Milestone

Comments

@dzjuck
Copy link

dzjuck commented May 5, 2015

passed = []
hash = {a: 1}
hash.take_while { |pair| passed << pair; true }
passed
# [:a] # jruby-1.7.19
# [[:a, 1]] # jruby-head
# [[:a, 1]] # mri-1.9.3
# [[:a, 1]] # mri-2.2.1

Thank you.

@nirvdrum
Copy link
Contributor

nirvdrum commented May 5, 2015

This appears to be problematic in 1.7.19 as well.

@dzjuck
Copy link
Author

dzjuck commented May 5, 2015

@nirvdrum Thank you, it's typo, i meant 1.7.19

@dzjuck dzjuck changed the title Hash#take_while wrong behavior in 1.7.9 Hash#take_while wrong behavior in 1.7.19 May 5, 2015
@nirvdrum
Copy link
Contributor

nirvdrum commented May 5, 2015

No worries. We often get bug reports against older versions of JRuby. So I like to verify that the problem is still present in the most recently released version.

@kares
Copy link
Member

kares commented May 29, 2015

closing on jruby-1_7 with d8aa8af

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants