Skip to content

binding.pry doesn't fire when it's on the last line of a program #45

Open
@squarism

Description

@squarism

Failing case:

gem install pry-byebug

# test.rb
require 'pry'
binding.pry

Test: ruby test.rb. No pry shell opens.

Passing case:
gem uninstall pry-byebug

Or, add a line with assignment. Oddly enough, ending lines of comments or simply an ending line of 1 doesn't workaround this.

# test.rb
require 'pry'
binding.pry
a = 1

Test: ruby test.rb. The pry shell opens.

The workaround is pretty simple. Ever since moving to ruby 2 and getting rid of pry-nav, I've just got in the habit of doing this. Logging an issue in case this is unexpected. 🍰

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions