Created
March 25, 2012 03:51
-
-
Save bfabry/2191262 to your computer and use it in GitHub Desktop.
This file contains 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
[13] pry(main)> bad_long_code = " | |
[13] pry(main)* if var > 2 | |
[13] pry(main)* blahblah | |
[13] pry(main)* else | |
[13] pry(main)* var === | |
[13] pry(main)* end | |
[13] pry(main)* " | |
=> "\nif var > 2\n blahblah\nelse\n var ===\nend\n" | |
[14] pry(main)> begin | |
[14] pry(main)* eval("lambda {" + bad_long_code + "}") | |
[14] pry(main)* rescue SyntaxException => e | |
[14] pry(main)* e | |
[14] pry(main)* end | |
NameError: uninitialized constant Object::SyntaxException | |
from (pry):31:in `rescue in <main>' | |
[15] pry(main)> edit | |
=> #<SyntaxError: (eval):6: syntax error, unexpected keyword_end> | |
[16] pry(main)> cd e | |
[17] pry(#<SyntaxError>):1> ls | |
Exception#methods: == backtrace exception inspect message set_backtrace to_s | |
self.methods: __binding_impl__ | |
locals: _ _dir_ _ex_ _file_ _in_ _out_ _pry_ | |
[18] pry(#<SyntaxError>):1> message | |
=> "(eval):6: syntax error, unexpected keyword_end" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment