Skip to content

Hash#take_while wrong behavior in 1.7.19 #2907

@dzjuck

Description

@dzjuck
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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions