From: Martin DeMello Date: 2003-06-23T03:50:25+09:00 Subject: Re: String#decorate Simon Strandgaard <0bz63fz3m1qt3001@sneakemail.com> wrote: > If I do #map on a string.. then it looks like this: >> irb > irb(main):001:0> x = "abcdef" > => "abcdef" > irb(main):002:0> puts x.map {|y| "<#{y}>"} > > => nil > irb(main):003:0> Doh! Of course, it's per line, not per character. Was thinking of each_byte. ruby -e 'p "line 1\nline 2".map {|i| "<<#{i}>>"}' ["<>", "<>"] martin