Skip to content

Commit fecf8e8

Browse files
clone array
1 parent f55220e commit fecf8e8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

2024/ruby/lib/advent_05_print_queue.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ def in_order?
115115
end
116116

117117
def reorder
118-
numbers = page_update.numbers
118+
numbers = page_update.numbers.to_a
119+
119120
return [] if numbers.empty?
120121

121122
numbers.sort! do |a, b|

0 commit comments

Comments
 (0)