Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
def mask(x)y=x.dup;y[6,6]='*'*6;y;end

rab commented Jun 8, 2010

Ryan, This changes the referenced string and is not equivalent to Dan's. -Rob


ryanbriones commented Jun 8, 2010

added #dup in order to not mutate x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment