Skip to content

Commit

Permalink
Load pry in a more idiomatic way (fixes #4)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcelis committed May 30, 2024
1 parent 564045f commit 2b02ff5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/rack/console.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ def start
main.extend(Rack::Console::Methods)
main.instance_variable_set(:@app, Rack::Console::Session.new(app))

begin
if Gem::Specification.find_all_by_name('pry').any?
require 'pry'
Pry.start
rescue LoadError
else
require 'irb'
IRB.start
end
Expand Down

0 comments on commit 2b02ff5

Please sign in to comment.