From: Ben Bleything Date: 2006-08-12T01:48:48+09:00 Subject: Re: Codegolf - Pascals Triangle On Fri, Aug 11, 2006, Carlos wrote: > Let's reuse a not needed array and save 4 bytes :) (doesn't work if you > set RUBY_OPT to always require some module...) > > 34.times{k=0;puts ($".map!{|i|k+k=i}<<1)*" "} This doesn't work: >> 34.times{k=0;puts ($".map!{|i|k+k=i}<<1)*' '} TypeError: String can't be coerced into Fixnum from (irb):1:in `+' from (irb):1 from (irb):1 from (irb):1 from :0 However, changing $" to $* works like a champ :) 34.times{k=0;puts ($*.map!{|i|k+k=i}<<1)*' '} Ben