R
Roger Pack
I wish that backtraces had more information, and could also display
variables and bindings, etc.
ex:
Thread.current.backtrace_bindings or $!.bindings
and outputs like
NameError: undefined local variable or method `abc' for main:Object
from
/Users/rogerpack/dev/ruby-roger-useful-functions/irb_lookup.rb:40:in
`method_missing('abc', 34)'
from (irb):12
Also displaying the line of code that crashed you would be sweet, a la
NameError: undefined local variable or method `abc' for main:Object
print abc # the line in question
from
/Users/rogerpack/dev/ruby-roger-useful-functions/irb_lookup.rb:40:in
`method_missing('abc', 34)'
from (irb):12
Though I suppose this is indeed possible in Ruby as it currently is ex:
[1]'s source_extract function
Take care.
-R
[1]
http://github.com/rails/rails/tree/...ntroller/templates/rescues/template_error.erb
variables and bindings, etc.
ex:
Thread.current.backtrace_bindings or $!.bindings
and outputs like
NameError: undefined local variable or method `abc' for main:Object
from
/Users/rogerpack/dev/ruby-roger-useful-functions/irb_lookup.rb:40:in
`method_missing('abc', 34)'
from (irb):12
Also displaying the line of code that crashed you would be sweet, a la
NameError: undefined local variable or method `abc' for main:Object
print abc # the line in question
from
/Users/rogerpack/dev/ruby-roger-useful-functions/irb_lookup.rb:40:in
`method_missing('abc', 34)'
from (irb):12
Though I suppose this is indeed possible in Ruby as it currently is ex:
[1]'s source_extract function
Take care.
-R
[1]
http://github.com/rails/rails/tree/...ntroller/templates/rescues/template_error.erb