Age | Commit message (Collapse) | Author |
|
|
|
|
|
(https://github.com/ruby/irb/pull/836)
https://github.com/ruby/irb/commit/73b35bb7f4
|
|
(https://github.com/ruby/irb/pull/832)
The candidate list for empty input is all methods + all variables +
all constants + all keywords. It's a long list that is not useful.
https://github.com/ruby/irb/commit/812dc2df7b
|
|
(https://github.com/ruby/irb/pull/831)
https://github.com/ruby/irb/commit/5843616c78
|
|
(https://github.com/ruby/irb/pull/826)
* Fix display_document params in noautocomplete mode
* Fix wrong preposing and target order in display_document
The fixed wrong-ordered value is not used in RegexpCompletor, so this change does not affect the test.
https://github.com/ruby/irb/commit/08208adb5e
|
|
(https://github.com/ruby/irb/pull/829)
* test_recovery_sigint: Ensure precondition is met
test_recovery_sigint depends on its process has SIG_DEF sigaction for
SIGINT. When its parent process set SIG_IGN which inherits to children,
then this test fails. This patch ensures this precondition met
regardless of inherited sigaction from its parent.
* Add test for restoration of other SIGINT handlers
Add another variant of test_recovery_sigint to ensure IRB to preserve
existing SIGINT handler other than SIG_DEF.
https://github.com/ruby/irb/commit/77ee59d026
|
|
(https://github.com/ruby/irb/pull/827)
https://github.com/ruby/irb/commit/99b0017d75
|
|
(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/814)
https://github.com/ruby/irb/commit/320178b120
|
|
(https://github.com/ruby/irb/pull/813)
https://github.com/ruby/irb/commit/e79a90a1e6
|
|
|
|
|
|
(https://github.com/ruby/irb/pull/807)
https://github.com/ruby/irb/commit/2cccc448de
|
|
(https://github.com/ruby/irb/pull/799)
https://github.com/ruby/irb/commit/ee85e84935
|
|
(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/795)
* Scrub past history input before split
* Don't rewrite ENV["LANG"]
https://github.com/ruby/irb/commit/0f344f66d9
|
|
(https://github.com/ruby/irb/pull/784)
* Page evaluation result's output
This will make it easier to work with long output that exceeds the terminal's height.
* Use consistent TERM in rendering tests
This makes sure we get consistent result on all platforms.
https://github.com/ruby/irb/commit/4fedce93d3
|
|
implementation
(https://github.com/ruby/irb/pull/772)
https://github.com/ruby/irb/commit/a4868a5373
|
|
* Remove trailing spaces
* Migrate show_source tests to integration tests
Because show_source tests often need to define class and/or methods,
they can easily leak state to other tests. Changing them to integration
tests will ensure that they are run in a clean environment.
* Fix NoMethodError caused by SourceFinder#method_target
https://github.com/ruby/irb/commit/3c39f13397c72a8db24e50afdcb8942e6c4ea12f
|
|
want to access a methods origin definition. It allows for chaining
of multiple esses to further go up the classes as needed.
(https://github.com/ruby/irb/pull/770)
https://github.com/ruby/irb/commit/eec1329d5a
|
|
prompt
(https://github.com/ruby/irb/pull/791)
Currently, IRB just terminates if `main.to_s` raises while IRB
constructs the prompt string. This can easily happen if the user wants
to start an IRB session in the instance scope of an uninitialized
object, for example:
```
class C
def initialize
binding.irb
@values = []
end
def to_s = @values.join(',') # raises if uninitialized
end
C.new
```
This patch makes IRB rescue from such an exception and displays the
class name of the exception instead of `main.to_s` to indicate some
error has occurred.
We may display more detailed information about the exception, but this
patch chooses not to do so because 1) the prompt has limited space,
2) users can evaluate `to_s` in IRB to examine the error if they want,
and 3) obtaining the details can also raise, which requires nested
exception handling and can be complicated.
https://github.com/ruby/irb/commit/412ab26067
|
|
(https://github.com/ruby/irb/pull/789)
If `output_modifier_proc`'s `complete` arg is true, it means the input is
submitted. In that case, debugger hint doesn't provide value to users
and adds noise to the output. So we hide it in such case.
https://github.com/ruby/irb/commit/f86d9dbe2f
|
|
(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/782)
https://github.com/ruby/irb/commit/fa9ecf9a5b
|
|
test_autocomplete_with_multiple_doc_namespaces
(https://github.com/ruby/irb/pull/786)
https://github.com/ruby/irb/commit/85c6ddeb7d
|
|
(https://github.com/ruby/irb/pull/780)
https://github.com/ruby/irb/commit/d42138c477
|
|
(https://github.com/ruby/irb/pull/768)
When user enters irb:rdbg session, they don't get the same hint that the
`debug` gem provides, like
```
(rdbg) n # next command
```
This means that users may accidentally execute commands when they want to
retrieve the value of a variable.
So this commit adds a Reline output modifier to add a simiar hint:
```
irb:rdbg(main):002> n # debug command
```
It is not exactly the same as `debug`'s because in this case the importance
is to help users distinguish between value evaluation and debugger command
execution.
https://github.com/ruby/irb/commit/fdf24de851
|
|
(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/764)
https://github.com/ruby/irb/commit/07e4d540cc
|
|
* Revert "Fixup da2c2931a60"
This reverts commit e1978a905a32af2d48b6e9efb6d0fe1656fddc5b.
* Revert "Skip Type completion tests related with IRB::VERSION"
This reverts commit da2c2931a602da22bc1fd10dc41f5c3a117bf502.
* require irb/version to test IRB::VERSION
---------
Co-authored-by: tompng <tomoyapenguin@gmail.com>
|
|
|
|
|
|
This reverts commit 5398bbcbab702907430ee019d07f5dcf2b0ce4af.
We explicitly load rubygems at rubygems_ext.rb
https://github.com/rubygems/rubygems/commit/8840d8507be72ff32bcbbdfb14e0b54efb364ffa
|
|
Revert "[ruby/irb] Revert "Skip TypeCompletion test in ruby ci"
This reverts commit 589e2b6782f17d5a1d55021c0395d5d73224e9da.
|
|
(https://github.com/ruby/irb/pull/748)"
(https://github.com/ruby/irb/pull/755)
This reverts commit https://github.com/ruby/irb/commit/d394af0bbce4.
https://github.com/ruby/irb/commit/a9d0145115
|
|
(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/748)
https://github.com/ruby/irb/commit/d394af0bbc
|
|
(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/743)
* Use IRB's own doc for doc dialog tests
* Run doc dialog tests for older Rubies too
* Remove unnecessary CI setups
https://github.com/ruby/irb/commit/97a2b86f0a
|
|
(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
|
|
This message is displayed if STDIN is not a tty. The parallel test is
the case.
https://github.com/ruby/irb/commit/e26e90e3fb
|
|
(https://github.com/ruby/irb/pull/732)
https://github.com/ruby/irb/commit/ef77c232cf
|
|
(https://github.com/ruby/irb/pull/730)
https://github.com/ruby/irb/commit/77265efc5f
|
|
completion
(https://github.com/ruby/irb/pull/726)
https://github.com/ruby/irb/commit/e42dc74ce0
|
|
(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
|
|
(https://github.com/ruby/irb/pull/701)
* Remove instance variable prompt and line_no from RubyLex
* Fix prompt test
* Rename prompt generating method and make it private
https://github.com/ruby/irb/commit/1ceb97fe2e
|
|
refactored for future extension
(https://github.com/ruby/irb/pull/707)
* Move completion implementation to completion/regexp_completor for future extension
* Remove constant CompletionProc and PerfectMatchedProc and add a class method
* Move document display logic to InputCompletor. Each completor only need to implement `completion_caididates` and `doc_namespace`
* Move display_document logic to RelineInputMethod
* Use RegexpCompletor directly. Not through class method of InputCompletor.
* RegexpCompletor extends BaseCompletor, move back definition to completion.rb
* Move display_document test to input_method test
* Stop re-initialize completor on each completion phase
* Store completor to ReadlineInputMethod's iver
https://github.com/ruby/irb/commit/1e98521483
|
|
(https://github.com/ruby/irb/pull/684)
After this change, `RubyLex` will not interact with `Context` directly
in any way. This decoupling has a few benefits:
- It makes `RubyLex` easier to test as it no longer has a dependency on
`Context`. We can see this from the removal of `build_context` from
`test_ruby_lex.rb`.
- It will make `RubyLex` easier to understand as it will not be affected
by state changes in `Context` objects.
- It allows `RubyLex` to be used in places where `Context` is not available.
https://github.com/ruby/irb/commit/d5b262a076
|