From: Chris Date: 2002-04-16T06:02:47+09:00 Subject: Re: Pascal to Ruby In article , David Alan Black wrote: > I was trying something along similar lines with Array. I don't know if it's > useful but I really like all the verbs in it: Ruby poetry, anyone? :-) > class Array > def insert(e,i) > m,n = self[0..i-1], self[i..-1] > replace m > push e > concat n > return self > end > end Which then could be used for the original problem... class String def insert(e, i) ((split "").insert e, i).join end end