Created
July 10, 2018 13:38
-
-
Save stoivo/e7fd992e234c5da6c33c78a6922a4005 to your computer and use it in GitHub Desktop.
Link: PrisonBreak (beta): https://ruby-prison-break.herokuapp.com/escapes/new
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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] |
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]]
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
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.