mirror of
https://github.com/ruby/ruby.git
synced 2025-08-24 05:25:34 +02:00

The current `next` pre-command workaround on IRB source stepping moves the location by 1 extra line. A better way is to make `debug` skip IRB frames completely, which is what this commit does. It also fixes the step command's test. The `|` in regexp was not escaped so it was always incorrectly matched.
17 lines
255 B
Ruby
17 lines
255 B
Ruby
# frozen_string_literal: true
|
|
|
|
require_relative "debug"
|
|
|
|
module IRB
|
|
# :stopdoc:
|
|
|
|
module ExtendCommand
|
|
class Step < DebugCommand
|
|
def execute(*args)
|
|
super(do_cmds: ["step", *args].join(" "))
|
|
end
|
|
end
|
|
end
|
|
|
|
# :startdoc:
|
|
end
|