In Message-Id: <777da1740502030346417566d9 / mail.gmail.com>
Tom Rathbone <tom.rathbone / gmail.com> writes:

> "some string".collect do |x|
>    x + '|'
> end
> 
> >> "s|o|m|e| |s|t|r|i|n|g|"

require "enumerator"

p "some string".enum_for(:each_byte).inject("") {|s, c| s << c.chr << "|"}
#=> "s|o|m|e| |s|t|r|i|n|g|"


-- 
kjana / dm4lab.to                                       February 4, 2005
Speech is silver, silence is golden.