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

This comment has been minimized.

Show comment Hide comment
@rab

rab Jun 8, 2010

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

rab commented Jun 8, 2010

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

@ryanbriones

This comment has been minimized.

Show comment Hide comment
@ryanbriones

ryanbriones Jun 8, 2010

added #dup in order to not mutate x

Owner

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