Skip to content
Create a gist now

Instantly share code, notes, and snippets.

def mask(x)y=x.dup;y[6,6]='*'*6;y;end
@rab
rab commented Jun 8, 2010

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

@ryanbriones
Owner

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
Something went wrong with that request. Please try again.