Age | Commit message (Collapse) | Author |
|
(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
https://github.com/ruby/irb/commit/462c1284af
|
|
(https://github.com/ruby/irb/pull/867)
* Remove IRB.irb_exit! method
It's not necessary to introduce a new method just for the exit! command
at this moment.
* Rename ExitForcedAction to ForceExit
* Move force exit tests to a dedicated file
* Fix nested history saving with exit! command
Because we switched to use `Kernel#exit` instead of `exit!`, the outer
session's ensure block in `Irb#run` will be run, which will save the
history. This means the separate check to save history when force exiting
is no longer necessary.
* execute_lines helper should also capture IRB setup's output
This prevents setup warnings from being printed to test output
while allowing those output to be tested.
* Update readme
https://github.com/ruby/irb/commit/899d10ade1
|
|
(https://github.com/ruby/irb/pull/851)
* Added failing test for when writing history on exit
* Save history on exit
* Exit early when calling Kernel.exit
* use status 0 for kernel.exit
* Added test for nested sessions
* Update lib/irb.rb
---------
https://github.com/ruby/irb/commit/c0a5f31679
Co-authored-by: Stan Lo <[email protected]>
|
|
(https://github.com/ruby/irb/pull/857)
The new tests are skipped when ruby below 3.1, as it was a default gem on it, and in a version we do not support.
This also move definition of `use_tracer` to module Context instead of monkey patch.
https://github.com/ruby/irb/commit/08834fbd5f
|
|
(https://github.com/ruby/irb/pull/835)
* Remove unnecessary code from the exit command's implementation
1. The parameters of `IRB.irb_exit` were never used. But there are some
libraries seem to call it with arguments + it's declared on the top-level
IRB constant. So I changed the params to anonymous splat instead of removing them.
2. `Context#exit` was completely unnecessary as `IRB.irb_exit` doesn't use
the `@irb` instance it passes. And since it's (or should be treated as)
a private method, I simply removed it.
3. The `exit` command doesn't use the status argument it receives at all.
But to avoid raising errors on usages like `exit 1`, I changed the argument to
anonymous splat instead removing it.
* Make exit an actual command
* Update readme
https://github.com/ruby/irb/commit/452b543a65
|
|
(https://github.com/ruby/irb/pull/761)
* Implement `history` command
Lists IRB input history with indices. Also aliased as `hist`.
* Add tests for `history` command
* Address feedback: `puts` with multiple arguments instead of `join`ing
* Address feedback: Handle nil from splitting an empty input string
* Refactor line truncation
* Add `-g` grep option to `history` command
* Add `history` command to README
* Remove unused `*args` parameter
* Allow spaces to be included in grep
* Allow `/` to be included in grep regex
* Handle `input` being an empty string
* Exclude "#{index}: " from matching the grep regex
* Add new line after joining
https://github.com/ruby/irb/commit/3f9eacbfa9
|
|
(https://github.com/ruby/irb/pull/728)
* Remove useless test setup and teardown that sets MAIN_CONTEXT to nil
* Avoid adding command methods to main object in test
https://github.com/ruby/irb/commit/f204829a08
|
|
Trying to avoid a flaky failure like:
https://github.com/ruby/ruby/actions/runs/6486918029/job/17616113816
|
|
(https://github.com/ruby/irb/pull/623)
* Rename `ext/history.rb` to `ext/eval_history.rb`
To confusion with `lib/irb/history.rb`
* Add eval_history tests
* Rename eval_history's History to EvalHistory to avoid confusion
|
|
(https://github.com/ruby/irb/pull/613)
Since `IRB.conf[:SAVE_HISTORY]` is assigned with 1000 by default, history-saving
is a feature enabled by default. So it should not be treated as an extension,
which adds unnecessary complexity to the code.
|
|
(https://github.com/ruby/irb/pull/601)
This aligns with other warnings in irb and properly channel the message
to stderr.
|
|
(https://github.com/ruby/irb/pull/567)
* Give show_doc its own command class
* Print deprecation warning for `help` command
|
|
(https://github.com/ruby/irb/pull/559)
* Remove unnecessary command argument generation code
Now that all the supported Ruby versions handle splat args and splat kwargs,
we don't need that args generation code anymore.
* Remove unused command definition code
If we look at `@EXTEND_COMMANDS`, all commands are defined in a file, which
means the `if load_file` branch is always executed. Therefore we can drop
the else branch of that condition.
* Avoid defining unnecessary command methods
There's no need to define another command method just to call `Command.execute`.
|
|
(https://github.com/ruby/irb/pull/555)
* Remove all Ruby 2.6 support
* Drop Ruby 2.6 specific testing conditions
* Only run Ruby 2.7+ on CI
* Bump Ruby requirement to 2.7+
https://github.com/ruby/irb/commit/3f714b616c
|
|
Ruby implementations like JRuby and TruffleRuby already indicate their
compatibility target with RUBY_VERSION. We don't need to exclude
them from accepting keyword arguments as long as they target 2.7+.
https://github.com/ruby/irb/commit/bf20faa4e6
Co-authored-by: Kevin Menard <[email protected]>
|
|
* Remove unused ATTR_TTY and ATTR_PLAIN constants
They were added in https://github.com/ruby/irb/commit/d7d26b51bf47a52e4e2339e2ad509ace74f0e4c7
But the references were removed in https://github.com/ruby/irb/commit/1c76845cca59635bb0cf386ced721e34b25d7410
Co-authored-by: Alexandre Terrasa <[email protected]>
* Remove unused MethodExtender module
It was added in https://github.com/ruby/irb/commit/6cc5d718d7045952ef61d504d624f7e70ce828be
but it's not used anywhere.
Co-authored-by: Alexandre Terrasa <[email protected]>
* Remove unused IRB.irb_at_exit
It's not used after https://github.com/ruby/irb/commit/aaf4eb4e9830ae71240ca5d2047c5e3ad20a4044
Co-authored-by: Alexandre Terrasa <[email protected]>
* Remove unused InputCompletor.ignored_modules
It was added in https://github.com/ruby/irb/commit/88311ce3c84251e6f420246cd14efc96e00888be
but the reference was removed in https://github.com/ruby/irb/commit/78c74d24254145a39c4d30168dbcd87dbbbc66dc
* Remove unused TracerLoadError constant
This constant was added in https://github.com/ruby/irb/commit/cb50fa3738121e4d829cb05b4bcb0d5fb43760c5
but never referenced.
---------
https://github.com/ruby/irb/commit/7de0234325
Co-authored-by: Alexandre Terrasa <[email protected]>
|
|
(https://github.com/ruby/irb/pull/498)
When the main object is frozen, `IRB` wraps a `SimpleDelegator` around it.
But because `SimpleDelegator` doesn't delegate private methods, methods like
`require_relative` or `const_get` would cause error, which are needed for
lazily loading commands.
This commit works around this limitation by avoiding those private method calls
when setting up command execution.
|
|
https://github.com/ruby/irb/commit/cef125850d
|
|
https://github.com/ruby/irb/commit/07fae94862
|
|
(https://github.com/ruby/irb/pull/475)
In the long-term, we want to align with `Pry`, `byebug` and `debug` to
use the `help` command to list all commands, which is what `show_cmds`
currently does. And `show_doc` will be the command to look up Ruby APIs.
By aliasing `show_doc` to the current `help` now, users will have time
to get use to it.
|
|
descriptions
(https://github.com/ruby/irb/pull/463)
https://github.com/ruby/irb/commit/7e857655ac
|
|
(https://github.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://github.com/ruby/irb/commit/976100c1c2
|
|
* Add edit command
* Make find_source a public singleton method
* Add document for the edit command
* Make find_end private
* Remove duplicated private
https://github.com/ruby/irb/commit/4321674aa7
Co-authored-by: Takashi Kokubun <[email protected]>
|
|
(https://github.com/ruby/irb/pull/451)
* Document a full list of commands
* Document debug as well
* Make it less duplicated
|
|
https://github.com/ruby/irb/commit/30faa13fa3
|
|
(https://github.com/ruby/irb/pull/430)
* Support non-string input in show_source
* Test show_source as a method
|
|
Create line
https://github.com/ruby/irb/commit/64d6a461d5
|
|
If you call `binding.irb` on a class defined `#print`, it will crash, so call `Kernel.print`.
Fix [Bug #18389] `binding.irb` can fail in some classes that implement `context` and `print` methods.
https://github.com/ruby/irb/commit/d54b271984
|
|
https://github.com/ruby/irb/commit/d5060f7668
|
|
https://github.com/ruby/irb/commit/108cb04352
|
|
https://github.com/ruby/irb/commit/bc822e4aac
|
|
https://github.com/ruby/irb/commit/19b6c20604
|
|
https://github.com/ruby/irb/commit/9587ba13b5
|
|
|
|
Not to interfer in class variables.
|
|
You can use "measure" command to check performance in IRB like below:
irb(main):001:0> 3
=> 3
irb(main):002:0> measure
TIME is added.
=> nil
irb(main):003:0> 3
processing time: 0.000058s
=> 3
irb(main):004:0> measure :off
=> nil
irb(main):005:0> 3
=> 3
You can set "measure :on" by "IRB.conf[:MEASURE] = true" in .irbrc, and, also,
set custom performance check method:
IRB.conf[:MEASURE_PROC][:CUSTOM] = proc { |context, code, line_no, &block|
time = Time.now
result = block.()
now = Time.now
puts 'custom processing time: %fs' % (Time.now - time) if IRB.conf[:MEASURE]
result
}
https://github.com/ruby/irb/commit/3899eaf2e2
|
|
|
|
https://github.com/ruby/irb/commit/5f0aee56fa
|
|
https://github.com/ruby/irb/commit/a6fe58e916
|
|
Fixed misspellings reported at [Bug #16437], for default gems.
|
|
Fixed unmatched indent of the closing bracket for
`:irb_current_working_workspace`, and adjusted following elements.
|
|
mathn is deprecated from Ruby 2.2.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
When you change this to true, you may need to add more tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* lib/irb/**/*.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* lib/drb/ssl.rb: ditto.
* lib/irb/**/*.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
documentation of IRB
* doc/irb/irb.rd: remove stale documentation
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
number for negative arity.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|