summaryrefslogtreecommitdiff
path: root/lib/irb
AgeCommit message (Collapse)Author
2024-05-28[Bug #20511] Update reline-0.5.7 (#10848)Hiroshi SHIBATA
* Update reline-0.5.7 * Update irb-1.13.1
2023-12-20[ruby/irb] Bump version to v1.11.0Stan Lo
(https://github.com/ruby/irb/pull/818) https://github.com/ruby/irb/commit/7421359b92
2023-12-20[ruby/irb] Warn users about errors in loading RC filesStan Lo
(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
2023-12-13[ruby/irb] Warn and do nothing if block is passed to measure commandtomoya ishida
(https://github.com/ruby/irb/pull/813) https://github.com/ruby/irb/commit/e79a90a1e6
2023-12-12[ruby/irb] [DOC] RDoc for module IRBBurdette Lamar
(https://github.com/ruby/irb/pull/738) [DOC] RDoc for module IRB https://github.com/ruby/irb/commit/f3a0626298
2023-12-10[ruby/irb] Simplify show_source's super calculationStan Lo
(https://github.com/ruby/irb/pull/807) https://github.com/ruby/irb/commit/2cccc448de
2023-12-07[ruby/irb] Debugging command warning should not be specific to theStan Lo
`debug` command (https://github.com/ruby/irb/pull/806) https://github.com/ruby/irb/commit/b7b57311cc
2023-12-05[ruby/irb] Bump version to v1.10.1Stan Lo
(https://github.com/ruby/irb/pull/801) https://github.com/ruby/irb/commit/a1e431bd83
2023-12-05[ruby/irb] Disable pager when TERM is not set tooStan Lo
(https://github.com/ruby/irb/pull/802) https://github.com/ruby/irb/commit/173980974b
2023-12-05[ruby/irb] Pager should be disabled when TERM=dumbStan Lo
(https://github.com/ruby/irb/pull/800) For apps/libs that test against IRB, it's recommended to set `TERM=dumb` so they get minimum disruption from Reline's interactive-focus features. Therefore, we should follow the convention to disable pager when `TERM=dumb`. https://github.com/ruby/irb/commit/8a3002a39e
2023-12-03[ruby/irb] Bump version to v1.10.0Stan Lo
(https://github.com/ruby/irb/pull/798) https://github.com/ruby/irb/commit/4acc9b8d6c
2023-12-02[ruby/irb] Implement `history` commandGary Tou
(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
2023-12-01[ruby/irb] Scrub past history input before splithogelog
(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
2023-11-30[ruby/irb] Page evaluation result's outputStan Lo
(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
2023-11-29[ruby/irb] Use gem repl_type_completor, remove type_completiontomoya ishida
implementation (https://github.com/ruby/irb/pull/772) https://github.com/ruby/irb/commit/a4868a5373
2023-11-28[ruby/irb] Change show_source tests into integration testsPeter Zhu
* 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
2023-11-28[ruby/irb] This enhancement allows a user to add the -s flag if theypaulreece
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
2023-11-27[ruby/irb] Hide debugger hint after the input is submittedStan Lo
(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
2023-11-26[ruby/irb] Display aliases in help messageStan Lo
(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
2023-11-26[ruby/irb] Support disabling pagerStan Lo
(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
2023-11-23[ruby/irb] Hint debugger command in irb:rdbg sessionStan Lo
(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
2023-11-23[ruby/irb] Fix failure of more command with -R optionhogelog
(https://github.com/ruby/irb/pull/781) https://github.com/ruby/irb/commit/7d6849e44e
2023-11-22[ruby/irb] Require prism >= 0.18.0 (MatchWriteNode#targets andtomoya ishida
CaseMatchNode) (https://github.com/ruby/irb/pull/778) https://github.com/ruby/irb/commit/943c14b12e
2023-11-22[ruby/irb] Rescue Exception, ignore warning in completiontomoya ishida
doc_namespace (https://github.com/ruby/irb/pull/777) https://github.com/ruby/irb/commit/c2f671611a
2023-11-21[ruby/irb] Bump version to 1.9.1tomoya ishida
(https://github.com/ruby/irb/pull/773) https://github.com/ruby/irb/commit/997df3e849
2023-11-21[ruby/irb] Enable Setting Completer Type through `IRB_COMPLETOR`ima1zumi
(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
2023-11-18[ruby/irb] Fix irb crash on `{}.` completiontomoya ishida
(https://github.com/ruby/irb/pull/764) https://github.com/ruby/irb/commit/07e4d540cc
2023-11-10[ruby/irb] Bump version to 1.9.0ima1zumi
(https://github.com/ruby/irb/pull/757) https://github.com/ruby/irb/commit/41548b8bd0
2023-11-09[ruby/irb] Add command line option to select which completor to usetomoya ishida
(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
2023-11-08[ruby/irb] Type based completion using Prism and RBStomoya ishida
(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
2023-11-08[ruby/irb] Fix dancing-ruby Ctrl+C stoptomoya ishida
(https://github.com/ruby/irb/pull/735) https://github.com/ruby/irb/commit/802b1cb6d8
2023-10-28[ruby/irb] Easter egg for autocomplete modetomoya ishida
(https://github.com/ruby/irb/pull/737) * Show easter-egg inside document dialog in autocomplete mode * Show more easter_egg(dancing or logo) when Alt+d is pressed in autocomplete mode https://github.com/ruby/irb/commit/a8e5cc7354
2023-10-21[ruby/irb] Minor refactors around irb.rbStan Lo
(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
2023-10-14[ruby/irb] Bump version to 1.8.3tomoya ishida
(https://github.com/ruby/irb/pull/731) https://github.com/ruby/irb/commit/de79375ac1
2023-10-14[ruby/irb] Restore IRB::InputCompletor for compatibilitytomoya ishida
(https://github.com/ruby/irb/pull/730) https://github.com/ruby/irb/commit/77265efc5f
2023-10-12[ruby/irb] Bump version to 1.8.2Stan Lo
https://github.com/ruby/irb/commit/47693a2213
2023-10-12[ruby/irb] Fix require path completion disturbing string methodtomoya ishida
completion (https://github.com/ruby/irb/pull/726) https://github.com/ruby/irb/commit/e42dc74ce0
2023-10-12[ruby/irb] Fix test runner exit bugtomoya ishida
(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
2023-10-12[ruby/irb] Decouple RubyLex from prompt and line_notomoya ishida
(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
2023-10-11Fix calling exit if irb_context is nilTakashi Kokubun
Trying to avoid a flaky failure like: https://github.com/ruby/ruby/actions/runs/6486918029/job/17616113816
2023-10-11[ruby/irb] Rename current completor to RegexpCompletor andtomoya ishida
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
2023-10-11[ruby/irb] Avoid locking the debug UI to a single threadStan Lo
(https://github.com/ruby/irb/pull/725) Since `debug` stores and updates the target thread via its Session's `@tc` variable, we don't need to and shouldn't lock the UI to the thread that activates the integration. https://github.com/ruby/irb/commit/202efdbf0c
2023-10-04[ruby/irb] Clear all context usages in RubyLexStan Lo
(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
2023-09-22[ruby/irb] Page show_source's outputStan Lo
(https://github.com/ruby/irb/pull/719) https://github.com/ruby/irb/commit/3cedc5cb62
2023-09-16[ruby/irb] Handle Concurrent Sessions and Saving Readline::HISTORYChad Schroeder
(https://github.com/ruby/irb/pull/651) * handle concurrent sessions and saving Readline::HISTORY, fixes https://github.com/ruby/irb/pull/510 * separate tests * don't mutate the HISTORY object on the class * avoid repeated .to_i calls * remove intermediary history array * work with array, fix test comment --------- https://github.com/ruby/irb/commit/1681ada328 Co-authored-by: Stan Lo <stan001212@gmail.com>
2023-09-05[ruby/irb] Bump version to 1.8.1Stan Lo
(https://github.com/ruby/irb/pull/706) https://github.com/ruby/irb/commit/c7c838a4bf
2023-08-31[ruby/irb] Drop rdoc's version requirementStan Lo
(https://github.com/ruby/irb/pull/704) 1. The newer versions of rdoc requires pysch 4.0+, which could break apps using Ruby 3.0 or 2.7. #703 has more detailed explanation on this. 2. We actually don't use any version-specific rdoc APIs. So having a version requirement is not necessary atm. https://github.com/ruby/irb/commit/3e6ba78c42
2023-08-31[ruby/irb] Require Reline 0.3.8+Stan Lo
(https://github.com/ruby/irb/pull/702) Reline 0.3.8 reduces the chance of having a deadlock with the debugger while using the new `irb:rdbg` integration. https://github.com/ruby/irb/commit/9b8c56b7d4
2023-08-30[ruby/irb] Bump version to 1.8.0Stan Lo
(https://github.com/ruby/irb/pull/700) https://github.com/ruby/irb/commit/a061744ed3
2023-08-29[ruby/irb] Improve help/show_cmds message during debuggerStan Lo
integration (https://github.com/ruby/irb/pull/693) * `help` should display debugger's help during irb:rdbg session * Update `show_cmds`'s output when in irb:rdbg session https://github.com/ruby/irb/commit/4029c2e564