-
-
Notifications
You must be signed in to change notification settings - Fork 942
Closed
Labels
Milestone
Description
Discovered by @twalpole in SeleniumHQ/selenium#2880. It appears our lazy enumerable logic is trying to evaluate the next item eagerly, or something...
class A
include Enumerable
def initialize()
@result_enum = ["Text", "Text", "Text"].lazy.select do |t|
puts "evaluating lazy select"
true
end
end
def each(&block)
loop do
block.call(@result_enum.next)
end
end
end
A.new().firstRunning this on MRI prints "evaluating lazy select" once, while JRuby prints it twice.
Reactions are currently unavailable