# As we want to aggregate adiacent slots we convert all the
# slot integers into ranges (with just one element)
# So we have something like [1..1,2..2, ... and so forth.
# As we want to aggregate adiacent slots we convert all the
# slot integers into ranges (with just one element)
# So we have something like [1..1,2..2, ... and so forth.
# Finally we group ranges with adiacent elements.
slots = slots.reduce([]) {|a,b|
# Finally we group ranges with adiacent elements.
slots = slots.reduce([]) {|a,b|