William James wrote:

> E:\Ruby>ruby -v
> ruby 1.8.2 (2004-12-25) [i386-mswin32]
> 
> So it seems that this won't work without modification under 1.8.2.
> 
> As for making it shorter,
>   change
> puts f[w=gets(' ').to_i,gets.to_i].map{|i|['%3i']*w*' '%i}
>   to
> puts f[w=gets.to_i,$_[-3,2].to_i].map{|i|"%3d "*w%i}
> 
> An invisible extra space is printed at the end of each line.


It may be invisible but it will void your solution on codegolf.com.

cheers

Simon