{"action":"created","issue":{"url":"https://api.github.com/repos/ConradIrwin/pry-rescue/issues/71","labels_url":"https://api.github.com/repos/ConradIrwin/pry-rescue/issues/71/labels{/name}","comments_url":"https://api.github.com/repos/ConradIrwin/pry-rescue/issues/71/comments","events_url":"https://api.github.com/repos/ConradIrwin/pry-rescue/issues/71/events","html_url":"https://github.com/ConradIrwin/pry-rescue/issues/71","id":43333703,"number":71,"title":"pry-rescue doesn't work correctly if pry-byebug is loaded","user":{"login":"abicky","id":508822,"avatar_url":"https://avatars.githubusercontent.com/u/508822?v=3","gravatar_id":"","url":"https://api.github.com/users/abicky","html_url":"https://github.com/abicky","followers_url":"https://api.github.com/users/abicky/followers","following_url":"https://api.github.com/users/abicky/following{/other_user}","gists_url":"https://api.github.com/users/abicky/gists{/gist_id}","starred_url":"https://api.github.com/users/abicky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abicky/subscriptions","organizations_url":"https://api.github.com/users/abicky/orgs","repos_url":"https://api.github.com/users/abicky/repos","events_url":"https://api.github.com/users/abicky/events{/privacy}","received_events_url":"https://api.github.com/users/abicky/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2014-09-21T12:24:49Z","updated_at":"2015-05-28T04:24:30Z","closed_at":null,"body":"pry-byebug overwrites Pry.start and pry-rescue doesn't work correctly if pry-byebug is loaded, as you can see below:\r\n\r\n```\r\n% bundle exec pry\r\n[1] pry(main)> require './a.rb'\r\n=> true\r\n[2] pry(main)> foo\r\nRuntimeError: two\r\nfrom /path/to/a.rb:4:in `rescue in foo'\r\n[3] pry(main)> cd-cause\r\n\r\nFrom: /path/to/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/pry-rescue-1.4.1/lib/pry-rescue.rb @ line 207 PryRescue.with_program_name:\r\n\r\n    202: def with_program_name name\r\n    203:   before = $PROGRAM_NAME\r\n    204:   $PROGRAM_NAME = name\r\n    205:   yield\r\n    206: ensure\r\n => 207:   $PROGRAM_NAME = before\r\n    208: end\r\n\r\n[1] pry(PryRescue)>\r\n```\r\n\r\nMy Gemfile.lock is here:\r\n\r\n```\r\nGEM\r\n  remote: https://rubygems.org/\r\n  specs:\r\n    byebug (3.4.0)\r\n      columnize (~> 0.8)\r\n      debugger-linecache (~> 1.2)\r\n      slop (~> 3.6)\r\n    coderay (1.1.0)\r\n    columnize (0.8.9)\r\n    debugger-linecache (1.2.0)\r\n    interception (0.5)\r\n    method_source (0.8.2)\r\n    pry (0.10.1)\r\n      coderay (~> 1.1.0)\r\n      method_source (~> 0.8.1)\r\n      slop (~> 3.4)\r\n    pry-byebug (2.0.0)\r\n      byebug (~> 3.4)\r\n      pry (~> 0.10)\r\n    pry-rescue (1.4.1)\r\n      interception (>= 0.5)\r\n      pry\r\n    slop (3.6.0)\r\n\r\nPLATFORMS\r\n  ruby\r\n\r\nDEPENDENCIES\r\n  pry\r\n  pry-byebug\r\n  pry-rescue\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/ConradIrwin/pry-rescue/issues/comments/106166325","html_url":"https://github.com/ConradIrwin/pry-rescue/issues/71#issuecomment-106166325","issue_url":"https://api.github.com/repos/ConradIrwin/pry-rescue/issues/71","id":106166325,"user":{"login":"gerrywastaken","id":71481,"avatar_url":"https://avatars.githubusercontent.com/u/71481?v=3","gravatar_id":"","url":"https://api.github.com/users/gerrywastaken","html_url":"https://github.com/gerrywastaken","followers_url":"https://api.github.com/users/gerrywastaken/followers","following_url":"https://api.github.com/users/gerrywastaken/following{/other_user}","gists_url":"https://api.github.com/users/gerrywastaken/gists{/gist_id}","starred_url":"https://api.github.com/users/gerrywastaken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gerrywastaken/subscriptions","organizations_url":"https://api.github.com/users/gerrywastaken/orgs","repos_url":"https://api.github.com/users/gerrywastaken/repos","events_url":"https://api.github.com/users/gerrywastaken/events{/privacy}","received_events_url":"https://api.github.com/users/gerrywastaken/received_events","type":"User","site_admin":false},"created_at":"2015-05-28T04:24:30Z","updated_at":"2015-05-28T04:24:30Z","body":"There are many issues like this caused by the fact that pry-byebug changes pry so that it advances to the next line after a breakpoint is hit. See the discussion here: https://github.com/deivid-rodriguez/pry-byebug/issues/45"}}