# File lib/haml/util.rb, line 167 def substitute(ary, from, to) res = ary.dup i = 0 while i < res.size if res[i...i+from.size] == from res[i...i+from.size] = to end i += 1 end res end