Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
On Ruby 2.5, format of
RubyVM::InstructionSequence#disasm
will be changed. By this change we can not detect which
line is valid to set breakpoints. On the other hand
Ruby 2.5 will introduce new methods
RubyVM::InstructionSequence#each_child
Iterate all direct child instruction sequences.
RubyVM::InstructionSequence#trace_points
Return trace points in the instruction sequence.
see: https://github.com/ruby/ruby/blob/9fe26ef8de1ae047a4d775ce74878a0aeb01a19b/NEWS
We can detect potential_lines by these methods.
So this commit defines new methods and call each_child &
trace_points if these methods are implemented.
Thanks to Koichi Sasada (ko1) for investigation, implemention of
new methods for Ruby and concept implementation for byebug.
This PR is a part of Ruby 2.5 support. I will send another PR to fix some
test cases.
Related: #345