Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix continue! with byebug calls #546

Merged

Conversation

deivid-rodriguez
Copy link
Owner

The continue! command was not ignoring further byebug calls as expected.

Before

$ ruby -r byebug sum.rb 

[1, 9] in /home/deivid/Code/byebug/sum.rb
   1: sum = 0
   2: 
   3: 2.times do |i|
   4:   byebug
=> 5:   sum += i
   6: end
   7: 
   8: byebug
   9: puts "Sum is #{sum}"
(byebug) c!

[1, 9] in /home/deivid/Code/byebug/sum.rb
   1: sum = 0
   2: 
   3: 2.times do |i|
   4:   byebug
=> 5:   sum += i
   6: end
   7: 
   8: byebug
   9: puts "Sum is #{sum}"
(byebug) c!

[1, 9] in /home/deivid/Code/byebug/sum.rb
   1: sum = 0
   2: 
   3: 2.times do |i|
   4:   byebug
   5:   sum += i
   6: end
   7: 
   8: byebug
=> 9: puts "Sum is #{sum}"
(byebug) c!
Sum is 1

After

$ RUBYOPT=-Ilib ruby -r byebug sum.rb 

[1, 9] in /home/deivid/Code/byebug/sum.rb
   1: sum = 0
   2: 
   3: 2.times do |i|
   4:   byebug
=> 5:   sum += i
   6: end
   7: 
   8: byebug
   9: puts "Sum is #{sum}"
(byebug) c!
Sum is 1

@deivid-rodriguez deivid-rodriguez force-pushed the fix_continue_unconditionally_with_byebug_calls branch from 395a686 to 7fe59d8 Compare March 11, 2019 09:45
After the previous change, one would get the error `undefined method
`mode' for Byebug:Module` when running a file with `byebug` calls. A
`require` call needed to be moved up.
@deivid-rodriguez deivid-rodriguez force-pushed the fix_continue_unconditionally_with_byebug_calls branch from 7fe59d8 to 9948d64 Compare March 11, 2019 10:22
@deivid-rodriguez deivid-rodriguez merged commit f18a730 into master Mar 11, 2019
@deivid-rodriguez deivid-rodriguez deleted the fix_continue_unconditionally_with_byebug_calls branch March 11, 2019 11:36
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request May 6, 2019
## [11.0.1] - 2019-03-18

### Fixed

* [#546](deivid-rodriguez/byebug#546): `continue!` to ignore further `byebug` calls.
* [#545](deivid-rodriguez/byebug#545): `skip` autolisting code for intermediate skipped breakpoints.
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request May 19, 2019
## [11.0.1] - 2019-03-18

### Fixed

* [#546](deivid-rodriguez/byebug#546): `continue!` to ignore further `byebug` calls.
* [#545](deivid-rodriguez/byebug#545): `skip` autolisting code for intermediate skipped breakpoints.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant