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
Labels
Milestone

Comments

@dzjuck
Copy link

@dzjuck 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 nirvdrum commented May 5, 2015

This appears to be problematic in 1.7.19 as well.

@dzjuck
Copy link
Author

@dzjuck 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 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 kares added this to the JRuby 1.7.21 milestone May 5, 2015
@kares kares self-assigned this May 26, 2015
kares added a commit to kares/jruby that referenced this issue May 26, 2015
kares added a commit to kares/jruby that referenced this issue May 26, 2015
kares added a commit to kares/jruby that referenced this issue May 27, 2015
kares added a commit to kares/jruby that referenced this issue May 28, 2015
kares added a commit to kares/jruby that referenced this issue May 29, 2015
@kares
Copy link
Member

@kares 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
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.