Age | Commit message (Collapse) | Author |
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12624
|
|
Closes https://github.com/ruby/irb/pull/753
https://github.com/ruby/irb/commit/a24ac53d48
Notes:
Merged: https://github.com/ruby/ruby/pull/12612
|
|
(https://github.com/ruby/irb/pull/1062)
Although not documented, `IRB.conf[:SAVE_HISTORY]` used to accept boolean,
which now causes `NoMethodError` when used.
This commit changes the behavior to accept boolean values and
adds tests for the behavior.
https://github.com/ruby/irb/commit/8b1a07b2a8
|
|
TypeCompletor and fallback to RegexpCompletor.
(https://github.com/ruby/irb/pull/1010)
https://github.com/ruby/irb/commit/bb6a99d815
|
|
values
(https://github.com/ruby/irb/pull/953)
Currently, users can only find out that they have set a wrong value
for IRB configs when the value is used, with opaque error messages like
"comparison of Integer with true failed (TypeError)".
This commit adds a new initialization step to validate the values of
some IRB configs, so that users can find out about the wrong values
during the initialization of IRB.
https://github.com/ruby/irb/commit/af8ef2948b
|
|
(https://github.com/ruby/irb/pull/901)
* Always save irb_history in HOME or XDG_CONFIG_HOME
Also split irbrc search logic from irb_history search logic as a refactor
* Remove IRB.conf[:RC_NAME_GENERATOR] because it's not configurable
This conf is used to specify which irbrc to load. Need to configure before irbrc is loaded, so it's actually not configurable.
This conf is also used for history file search, but it is configurable by conf[:HISTORY_FILE].
* remove rc_file_test because it is tested with rc_files, remove useless test setup
* Make internal irbrc searching method private
https://github.com/ruby/irb/commit/11d03a6ff7
|
|
(https://github.com/ruby/irb/pull/859)
This allows hierarchy when loading rc files for example both files below
are loaded;
project/.irbrc
~/.irbrc
https://github.com/ruby/irb/commit/b53ebc6655
Co-authored-by: Stan Lo <[email protected]>
|
|
(https://github.com/ruby/irb/pull/881)
https://github.com/ruby/irb/commit/83d90550c2
|
|
(https://github.com/ruby/irb/pull/864)
* Remove useless ivar
* Simplify tracer test setup
* Treat tracer like a normal development dependency
* Only require ext/tracer when value is truthy
* Make tracer integration skip IRB traces
https://github.com/ruby/irb/commit/a97a4129a7
|
|
(https://github.com/ruby/irb/pull/850)
https://github.com/ruby/irb/commit/06b2d00dd3
|
|
(https://github.com/ruby/irb/pull/817)
1. Because `IRB.rc_file` always generates an rc file name, even if the
file doesn't exist, we should check the file exists before trying to
load it.
2. If any type of errors occur while loading the rc file, we should
warn the user about it.
https://github.com/ruby/irb/commit/37ffdc6b19
|
|
(https://github.com/ruby/irb/pull/813)
https://github.com/ruby/irb/commit/e79a90a1e6
|
|
(https://github.com/ruby/irb/pull/788)
Similar to Pry, it displays user-defined aliases in the help message with
a dedicated section. With the current default aliases, it looks like:
```
...other sections...
Aliases
$ Alias for `show_source`
@ Alias for `whereami`
```
https://github.com/ruby/irb/commit/2a0eacc891
|
|
(https://github.com/ruby/irb/pull/783)
With either `IRB.conf[:USE_PAGER] = false` or `--no-pager` commnad line flag.
I decided use `--no-pager` instead of `--use-pager` because it matches with
Pry and git's command line flags.
https://github.com/ruby/irb/commit/df1c3b9042
|
|
(https://github.com/ruby/irb/pull/771)
I propose introducing the capability to set the IRB completion kinds via an environment variable, specifically `IRB_COMPLETOR=type`.
This feature aims to enhance the Rails console experience by allowing Rails users to specify their preferred completion more conveniently.
Currently, when using the Rails console, there's no straightforward way to globally set the type completion across a Rails application repository.
It's possible to configure this setting by placing a `.irbrc` file at the project root. However, using a .irbrc file is not ideal as it allows for broad configurations and can potentially affect the production environment.
My suggestion focuses on allowing users to set the completion to 'type' in a minimal.
This enhancement would be particularly beneficial for teams writing RBS in their Rails applications.
This type completer, integrated with RBS, would enhance completion accuracy, improving the Rails console experience.
https://github.com/ruby/irb/commit/032f6da25f
|
|
(https://github.com/ruby/irb/pull/754)
* Add command line option to select which completor to use
* Add test for completor argv
https://github.com/ruby/irb/commit/1dec2708c9
|
|
(https://github.com/ruby/irb/pull/708)
* Add completor using prism and rbs
* Add TypeCompletion test
* Switchable completors: RegexpCompletor and TypeCompletion::Completor
* Add completion info to irb_info
* Complete reserved words
* Fix [*] (*) {**} and prism's change of KeywordParameterNode
* Fix require, frozen_string_literal
* Drop prism<=0.16.0 support
* Add Completor.last_completion_error for debug report
* Retrieve `self` and `Module.nesting` in more safe way
* Support BasicObject
* Handle lvar and ivar get exception correctly
* Skip ivar reference test of non-self object in ruby < 3.2
* BaseScope to RootScope, move method objects constant under Methods
* Remove unused Splat struct
* Drop deeply nested array/hash type calculation from actual object. Now, calculation depth is 1
* Refactor loading rbs in test, change preload_in_thread not to cache Thread object
* Use new option added in prism 0.17.1 to parse code with localvars
* Add Prism version check and warn when :type completor cannot be enabled
* build_type_completor should skip truffleruby (because endless method definition is not supported)
https://github.com/ruby/irb/commit/1048c7ed7a
|
|
(https://github.com/ruby/irb/pull/736)
* Remove dead method
* Simplify IRB.version
* Move private Irb methods together
* Centralise @CONF initialization/assignment in init.rb
* Move attr_* calls above initialize method
https://github.com/ruby/irb/commit/cf23be4395
|
|
(https://github.com/ruby/irb/pull/685)
https://github.com/ruby/irb/commit/66e69fa0dc
|
|
INF_RUBY prompt
(https://github.com/ruby/irb/pull/679)
* Drop showing indent level number in DEFAULT prompt and INF_RUBY prompt
* Update prompt part of test_rendering's expected result
https://github.com/ruby/irb/commit/3847532e54
|
|
(https://github.com/ruby/irb/pull/522)
https://github.com/ruby/irb/commit/97dae166ae
|
|
https://github.com/ruby/irb/commit/cef125850d
|
|
https://github.com/ruby/irb/commit/07fae94862
|
|
HOME directory, not current directory
https://github.com/ruby/irb/commit/33a5e55ffd
|
|
`IRB_USE_AUTOCOMPLETE=false`
(https://github.com/ruby/irb/pull/469)
* Allow using IRB_USE_AUTOCOMPLETE=false to disable autocompletion
Currently, the only 2 ways to disable autocompletion are:
1. Create `.irbrc` and set `IRB.conf[:USE_AUTOCOMPLETE] = false`
2. Add the `--noautocomplete` flag when using the `irb` executable
Both of them are less convenient than setting a env var and are
lesser known to devs.
And given the number of problems the autocompletion has (see #445), I
think we should allow disabling it with a simple `IRB_USE_AUTOCOMPLETE=false`.
* Mention some env var configs in the README
|
|
(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
|
|
https://github.com/ruby/irb/commit/9957e83f7d
|
|
(https://github.com/ruby/irb/pull/438)
https://github.com/ruby/irb/commit/0613589476
|
|
(https://github.com/ruby/irb/pull/426)
* Allow non-identifier aliases
* Move the configuration to IRB.conf
* Avoid abusing method lookup for symbol aliases
* Add more alias tests
* A small optimization
* Assume non-nil Context
* Load IRB.conf earlier
https://github.com/ruby/irb/commit/e23db5132e
|
|
(https://github.com/ruby/irb/pull/357)
https://github.com/ruby/irb/commit/298b134792
|
|
https://no-color.org has been updated (jcs/no_color#83):
> Command-line software which adds ANSI color to its output by default
should check for a `NO_COLOR` environment variable that, when present
and **not an empty string** (regardless of its value), prevents the
addition of ANSI color.
https://github.com/ruby/irb/commit/46e0f7e370
Co-authored-by: Stan Lo <[email protected]>
|
|
script
Also add --script option to turn the option back on.
Previously there wasn't a way to get an interactive IRB session
and access arguments provided on the command line.
Additionally, handle `-` as script as stdin. In Unix-like tools, `-`
means to take standard input instead of a file. This doesn't
result in exactly the same output for:
```
echo 'p ARGV' > args.rb; irb args.rb a b c
```
and
```
echo 'p ARGV' | irb - a b c
```
Due to how irb handles whether stdin is a tty.
However, this change allows use of `-` as a argument, instead of
giving an unrecognized switch error. This required some small
changes to context.rb (to handle `-` as standard input) and
input-method.rb (to have FileInputMethod accept IO arguments in
addition to strings).
Implements [Feature #15371]
https://github.com/ruby/irb/commit/4192683ba2
|
|
https://github.com/ruby/irb/commit/3f79cb506f
|
|
|
|
Allow usage of more detailed args when setting stackprof callback.
Signed-off-by: Ulysse Buonomo <[email protected]>
https://github.com/ruby/irb/commit/c9d101f450
|
|
When `NO_COLOR` is set to any non-nil value, output is not colorized.
See https://no-color.org/
https://github.com/ruby/irb/commit/401d0916fe
|
|
https://github.com/ruby/irb/commit/b444573aa2
|
|
https://github.com/ruby/irb/commit/20f1ca23e9
|
|
https://github.com/ruby/irb/commit/cc66b5573e
|
|
https://github.com/ruby/irb/commit/b43f35d8f3
|
|
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
|
|
This new mode uses a copy of the TOPLEVEL_BINDING. This is compatible with refinements (contrary to mode 3), while keeping nested IRB sessions separate
https://github.com/ruby/irb/commit/25c731cb2f
|
|
Requested in Ruby Bug 17377
https://github.com/ruby/irb/commit/698f6eb34a
|
|
ECHO_ON_ASSIGNMENT
https://github.com/ruby/irb/commit/4c89b0775b
|
|
Omit the results evaluated at assignment if they are too long.
The behavior of ECHO_ON_ASSIGNMENT being on by default is hard to understand,
so I change it to off by default. Instead, we turn OMIT_ON_ASSIGNMENT on by
default. The result is displayed on assignment, but it will always be short
and within one line of the screen.
https://github.com/ruby/irb/commit/c5ea79d5ce
|
|
* Support XDG_CONFIG_HOME for gemrc.
* Support XDG_DATA_HOME for .gem
* Added test for XDG_DATA_HOME
* Do not reuse environmental variable.
* Unify .rdoc path to RDoc.home.
* Support XDG_DATA_HOME for .rdoc
* Ignore exists?
* Extracted config_home path
* Use XDG_CONFIG_HOME for default credential path
* Fixed inconsistency location.
* Fixed the broken tests.
* Support XDG_CONFIG_HOME for irbrc
* Introduce Gem.cache_home as XDG_CACHE_HOME
* Use Gem.cache_home instead of Gem.config_home for the credential file of RubyGems.
* Initialized the old configurations
* Fixed test failure related the configuration initialization
* restore XDG_DATA_HOME
* Fixed the broken examples of bundler with XDG_*
* Do not modify environmental variable on test file
* Use XDG_DATA_HOME insted of XDG_CACHE_HOME for credential file
* stub out Gem.data_home
* Move dir accessor to defaults.rb file
* Use XDG_DATA_HOME for signed gem features
* Use XDG_DATA_HOME for spec cache
* Do not rely on Gem.user_home
* Gem.user_home is always exists. Don't need to use FileUitls.mkdir_p
* Bump support version to RubyGems 3.2.0+
* Removed the needless fallback configuration
* Fixed the inconsistency methods that are find_config_file and config_file
* Use Gem.configuration.credentials_path instead of hard-coded path
* gem_path is always provided
* Removed the duplicated code of find_home
* Also removed the duplicated code of user_home
* use Gem::UNTAINT instead of untaint for surpressing the warnings
* Use File.directory
* Restore XDG_DATA_HOME
* Use File.write
Notes:
Merged-By: hsbt <[email protected]>
|
|
|
|
|
|
|
|
|