Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/better_errors/repl/pry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ def initialize(binding, exception)
@input = BetterErrors::REPL::Pry::Input.new
@output = BetterErrors::REPL::Pry::Output.new
@pry = ::Pry.new input: @input, output: @output
@pry.hooks.clear_all if defined?(@pry.hooks.clear_all)
@pry.hooks.clear_event_hooks(:before_session) if @pry.hooks.respond_to?(:clear_event_hooks) # pry version >= 0.11.x
@pry.hooks.clear_all if @pry.hooks.respond_to?(:clear_all) # pry version <= 0.10.x
store_last_exception exception
@fiber.resume
end
Expand Down