-
-
Notifications
You must be signed in to change notification settings - Fork 942
Closed
Milestone
Description
jruby 9.3.6.0 (2.6.8) 2022-06-27 OpenJDK 64-Bit Server VM 14.0.2+12-46 on 14.0.2+12-46 +jit [x86_64-darwin]
MacOS 12.5.1 (Monterey)
I'm seeing a failure with each_slice + sum:
irb(main):001:0> w0 = 1; w1 = 2; w2 = 3;
=> 3
irb(main):002:0> index = [1,2,3]
=> [1, 2, 3]
irb(main):003:0> needed_bytes = (w0 + w1 + w2) * index.each_slice(2).sum(&:last)
With MRI this returns 30. With JRuby I see NoMethodError (undefined method 'last' for 1:Integer).
Initially spotted via gettalong/hexapdf#190
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels