Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.6
-
Fix Version/s: JRuby 1.7.0.RC1
-
Component/s: Core Classes/Modules
-
Labels:None
-
Environment:osx snow leopard
-
Testcase included:yes
-
Number of attachments :
Description
class A
include Enumerable
def initialize
@hash = {:a => [1], :b => [2,3]}
end
def order
[:a, :b]
end
def each
order.each { |k| yield( k,@hash[k] ) }
self
end
end
A.new.each {|x, y| puts [x, y].inspect }
A.new.map.each {|x, y| puts [x, y].inspect }
# Expected output, seen on jruby1.8 and MRI1.9.2
# [:a, [1]]
# [:b, [2, 3]]
# [:a, [1]]
# [:b, [2, 3]]
# jruby1.9 output, last two lines are wrong
# [:a, [1]]
# [:b, [2, 3]]
# [:a, nil]
# [:b, nil]
This test case could perhaps be more minimal than it is, but it clearly displays the issue.
Activity
Charles Oliver Nutter
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Resolution | Fixed [ 1 ] | |
| Fix Version/s | JRuby 1.7.0.RC1 [ 18717 ] | |
| Assignee | Charles Oliver Nutter [ headius ] | |
| Status | Open [ 1 ] | Resolved [ 5 ] |