Ruby Substitution using the AST