lib/web_console/exception_extension.rb in web-console-2.0.0.beta2 vs lib/web_console/exception_extension.rb in web-console-2.0.0.beta3

- old
+ new

@@ -1,20 +1,19 @@ +# Thanks to @charliesome who wrote this bit for better_errors. class Exception original_set_backtrace = instance_method(:set_backtrace) - if WebConsole.binding_of_caller_available? - define_method :set_backtrace do |*args| - unless Thread.current[:__web_console_exception_lock] - Thread.current[:__web_console_exception_lock] = true - begin - @__web_console_bindings_stack = binding.callers.drop(1) - ensure - Thread.current[:__web_console_exception_lock] = false - end + define_method :set_backtrace do |*args| + unless Thread.current[:__web_console_exception_lock] + Thread.current[:__web_console_exception_lock] = true + begin + @__web_console_bindings_stack = binding.callers.drop(1) + ensure + Thread.current[:__web_console_exception_lock] = false end - - original_set_backtrace.bind(self).call(*args) end + + original_set_backtrace.bind(self).call(*args) end def __web_console_bindings_stack @__web_console_bindings_stack || [] end