Hello,

> Isn't there a cleaner way?

Perhaps you could use each_cons (from 1.8.7):

str =3D "1 2 3 4"
arr =3D str.split
arr.size.downto(1) do |i|
  arr.each_cons(i) {|a| puts a.join(' ')}
end

Cheers,

--=20
JJ Fleck
PCSI1 Lyc=E9e Kl=E9ber