diff options
author | tomoya ishida <[email protected]> | 2024-09-13 00:04:33 +0900 |
---|---|---|
committer | git <[email protected]> | 2024-09-12 15:04:37 +0000 |
commit | a542479a750ff65c036df913a4b8d9dd350c4522 (patch) | |
tree | df27e605540364ca01063d43fc83511a1d7191bf /lib/irb/context.rb | |
parent | fcb058309b1e2ffcc372ca17b0bcf9812b492653 (diff) |
[ruby/irb] Remove KEYWORD_ALIASES which handled special alias name
of irb_break irb_catch and irb_next command
(https://github.com/ruby/irb/pull/1004)
* Remove KEYWORD_ALIASES which handled special alias name of irb_break irb_catch and irb_next command
* Remove unused instance variable user_aliases
Co-authored-by: Stan Lo <[email protected]>
---------
https://github.com/ruby/irb/commit/f256d7899f
Co-authored-by: Stan Lo <[email protected]>
Diffstat (limited to 'lib/irb/context.rb')
-rw-r--r-- | lib/irb/context.rb | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/lib/irb/context.rb b/lib/irb/context.rb index aa0c60b0e3..fafe99d57b 100644 --- a/lib/irb/context.rb +++ b/lib/irb/context.rb @@ -149,8 +149,7 @@ module IRB @newline_before_multiline_output = true end - @user_aliases = IRB.conf[:COMMAND_ALIASES].dup - @command_aliases = @user_aliases.merge(KEYWORD_ALIASES) + @command_aliases = IRB.conf[:COMMAND_ALIASES].dup end private def term_interactive? @@ -158,17 +157,6 @@ module IRB STDIN.tty? && ENV['TERM'] != 'dumb' end - # because all input will eventually be evaluated as Ruby code, - # command names that conflict with Ruby keywords need special workaround - # we can remove them once we implemented a better command system for IRB - KEYWORD_ALIASES = { - :break => :irb_break, - :catch => :irb_catch, - :next => :irb_next, - }.freeze - - private_constant :KEYWORD_ALIASES - def use_tracer=(val) require_relative "ext/tracer" if val IRB.conf[:USE_TRACER] = val |