Created
November 19, 2012 20:47
-
-
Save swarley/4113770 to your computer and use it in GitHub Desktop.
pry/pry-hack
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
| class Pry | |
| if VERSION <= "0.9.10" | |
| alias old_retrieve_line retrieve_line | |
| def retrieve_line(eval_string, *args) | |
| old_retrieve_line(eval_string, *args) | |
| eval_string.sub!(/\A.+?\Z/, Hackage.hack_line(eval_string)) | |
| end | |
| else | |
| hooks.add_hook(:foo, :pry_hack) do {|line| Hackage.hack_line(line) } | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment