Commit graph

4 commits

Author SHA1 Message Date
tomoya ishida
ca764062b0 [ruby/irb] Remove internal-only methods from Command::Base
(https://github.com/ruby/irb/pull/922)

* Remove internal-only methods from Command::Base

Command#ruby_args and Command#unwrap_string_literal are used for default command's argument backward compatibility.
Moved these methods to another module to avoid being used from custom commands.

* Update lib/irb/command/edit.rb

---------

7405a841e8

Co-authored-by: Stan Lo <stan001212@gmail.com>
2024-04-17 18:36:30 +00:00
tomoya ishida
6a505d1b59 [ruby/irb] Command implementation not by method
(https://github.com/ruby/irb/pull/824)

* Command is not a method

* Fix command test

* Implement non-method command name completion

* Add test for ExtendCommandBundle.def_extend_command

* Add helper method install test

* Remove spaces in command input parse

* Remove command arg unquote in help command

* Simplify Statement and handle execution in IRB::Irb

* Tweak require, const name

* Always install CommandBundle module to main object

* Remove considering local variable in command or expression check

* Remove unused method, tweak

* Remove outdated comment for help command arg

Co-authored-by: Stan Lo <stan001212@gmail.com>

---------

8fb776e379

Co-authored-by: Stan Lo <stan001212@gmail.com>
2024-04-10 16:52:53 +00:00
Stan Lo
4831bb5bab [ruby/irb] Turn on frozen literal in files
(https://github.com/ruby/irb/pull/881)

83d90550c2
2024-02-23 10:53:53 +00:00
Stan Lo
f5801e2bf4 [ruby/irb] Standardize command related names
(https://github.com/ruby/irb/pull/873)

* Replace ExtendCommand with Command and standardize command related names

1. Rename lib/irb/extend-command.rb to lib/irb/command.rb
2. Rename lib/irb/cmd/*.rb to lib/irb/command/*.rb
3. Rename test/irb/test_cmd.rb to test/irb/test_command.rb
4. Rename ExtendCommand to Command

* Alias ExtendCommand to Command and deprecate it

* Rename Command::Nop to Command::Base

* Not deprecate old constants just yet

* Add lib/irb/cmd/nop.rb back

462c1284af
2024-02-16 16:47:36 +00:00
Renamed from lib/irb/cmd/load.rb (Browse further)