From: Jim Menard Date: 2005-08-25T02:41:06+09:00 Subject: Re: ruby way for piece of code The code that replaces tag: a b c d b with tag: [[a => a]] [[b => b]] [[c => c]] [[d => d]] could be written new_content << 'tag:' line.split[1..-1].uniq.each { | tag | new_content << " [[#{tag} => #{tag}]]" } Jim -- Jim Menard, jim.menard@gmail.com, jimm@io.com http://www.io.com/~jimm