Skip to content

Instantly share code, notes, and snippets.

@banister

banister/cat.c Secret

Created April 28, 2012 13:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save banister/88d542675890acd117d4 to your computer and use it in GitHub Desktop.
Save banister/88d542675890acd117d4 to your computer and use it in GitHub Desktop.
[27] (pry) main: 0> sadf
NameError: undefined local variable or method `sadf' for main:Object
from (pry):11:in `<main>'
[28] (pry) main: 0> wtf?
Exception: NameError: undefined local variable or method `sadf' for main:Object
--
0: (pry):11:in `<main>'
1: /Users/john/ruby/projects/pry/lib/pry/pry_instance.rb:249:in `eval'
2: /Users/john/ruby/projects/pry/lib/pry/pry_instance.rb:249:in `re'
3: /Users/john/ruby/projects/pry/lib/pry/pry_instance.rb:227:in `rep'
4: /Users/john/ruby/projects/pry/lib/pry/pry_instance.rb:207:in `block (3 levels) in repl'
5: /Users/john/ruby/projects/pry/lib/pry/pry_instance.rb:206:in `loop'
6: /Users/john/ruby/projects/pry/lib/pry/pry_instance.rb:206:in `block (2 levels) in repl'
7: /Users/john/ruby/projects/pry/lib/pry/pry_instance.rb:205:in `catch'
8: /Users/john/ruby/projects/pry/lib/pry/pry_instance.rb:205:in `block in repl'
9: /Users/john/ruby/projects/pry/lib/pry/pry_instance.rb:204:in `catch'
[29] (pry) main: 0> cat --ex 0
Exception: NameError: undefined local variable or method `sadf' for main:Object
--
From: (pry) @ line 11 @ level: 0 of backtrace (of 39).
6: def goobye
7: end
8: 1
9: 4
10: lkj
=> 11: sadf
[30] (pry) main: 0> cat --ex 1
Exception: NameError: undefined local variable or method `sadf' for main:Object
--
From: /Users/john/ruby/projects/pry/lib/pry/pry_instance.rb @ line 249 @ level: 1 of backtrace (of 39).
244: # moved into the scope of a new Binding (e.g the user typed `cd`)
245: inject_sticky_locals(target)
246:
247: code = r(target)
248:
=> 249: result = target.eval(code, Pry.eval_path, Pry.current_line)
250: set_last_result(result, target, code)
251:
252: result
253: rescue RescuableException => e
254: self.last_exception = e
[31] (pry) main: 0> cat --ex 7
Exception: NameError: undefined local variable or method `sadf' for main:Object
--
From: /Users/john/ruby/projects/pry/lib/pry/pry_instance.rb @ line 205 @ level: 7 of backtrace (of 39).
200:
201: repl_prologue(target)
202:
203: break_data = nil
204: exception = catch(:raise_up) do
=> 205: break_data = catch(:breakout) do
206: loop do
207: rep(binding_stack.last)
208: end
209: end
210: exception = false
[32] (pry) main: 0>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment