diff options
author | Takashi Kokubun <[email protected]> | 2022-11-21 00:46:22 -0800 |
---|---|---|
committer | git <[email protected]> | 2022-11-21 08:46:27 +0000 |
commit | c9fbc779a680f3e1fd884ec80722cd32a990e0e9 () | |
tree | eaecf5a5673cbd05b9ffb3747ce724323254edb5 /lib/irb/context.rb | |
parent | 65e31402ae46672e87cddb1f2e618d1c00591151 (diff) |
[ruby/irb] Add commands to start and use the debugger
(https://.com/ruby/irb/pull/449) * Seamlessly integrate a few debug commands * Improve the break command support * Utilize skip_src option if available * Add step and delete commands * Write end-to-end tests for each debugger command * Add documentation * Add backtrace, info, catch commands https://.com/ruby/irb/commit/976100c1c2
-rw-r--r-- | lib/irb/context.rb | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -486,9 +486,9 @@ module IRB @workspace.local_variable_set(:_, exception) end - # Transform a non-identifier alias (ex: @, $) command, args = line.split(/\s/, 2) - if original = symbol_alias(command) line = line.gsub(/\A#{Regexp.escape(command)}/, original.to_s) command = original end @@ -545,10 +545,16 @@ module IRB workspace.binding.local_variables end - # Return a command name if it's aliased from the argument and it's not an identifier. - def symbol_alias(command) return nil if command.match?(/\A\w+\z/) - command_aliases[command.to_sym] end end end |