Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# oneline
a=[self].unshift 'secret';a.unshift 33;a.unshift :unlock;s=%w[se nd].join'';m=self.prison.method s.to_sym;m.to_proc[*a]
# mulltiline
a=[self].unshift 'secret';
a.unshift 33;
a.unshift :unlock;
s=%w[se nd].join'';
m=self.prison.method s.to_sym;
m.to_proc[*a]
@matz

This comment has been minimized.

Copy link

commented Jul 10, 2018

Here's my 85 char version:

class PrisonBreak::Prison;public:unlock;end;a=[22]|["secret"]|[self];prison.unlock *a

You need one more big trick to shorten to 53.

@stoivo

This comment has been minimized.

Copy link
Owner Author

commented Jul 10, 2018

With the nolage I can shorten it to 93
s=%w[se nd].join'';m=self.prison.method s.to_sym;m.to_proc[*[:unlock]|[33]|['secret']|[self]]

@agvald

This comment has been minimized.

Copy link

commented Jul 12, 2018

Here's my 64 char solution

s=prison.method methods[42];s[*[:unlock]|[22]|["secret"]|[self]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.