path: root/lib/irb
AgeCommit message (Collapse)Author
2 days[ruby/irb] Ensure stdout is a TTY before calling winsizePeter Jones
When outputting a (possibly truncated) value, IRB will query the window size. However, if IRB was piped to another process, stdout will no longer be a TTY and will not support the `winsize` method. This fix ensure that stdout is a TTY.
8 days[ruby/irb] Commands should respect `USE_COLORIZE` config ↵Stan Lo
2022-03-14[ruby/irb] Move `:stopdoc:` directiveNobuyoshi Nakada
If this is at the top level, it stops the documentation of the entire module, but not only the part in this file.
2022-01-27[ruby/irb] Changed to call Kernel.printmanga_osyo
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.
2022-01-17[ruby/irb] Use require_relative to load extensions/commandsst0012
2022-01-17[ruby/irb] Use require_relative to require lib filesst0012
1. `require` can mislead Ruby to load system irb's files and cause constant redefined warnings as other code loads the same module/class from lib folder. 2. Most files already use `require_relative`.
2021-12-29[ruby/irb] Prefer `IO#wait_readable` over `IO#select`. ↵Samuel Williams
2021-12-25[ruby/irb] Version 1.4.1aycabta
2021-12-25[ruby/irb] Support showing doc by dialog in iTerm2aycabta
2021-12-25[ruby/irb] Version 1.4.0aycabta
2021-12-25[ruby/irb] Update dependency, reline >= 0.3.0aycabta
2021-12-24Fix warning in `Lexer::Elem#[]`manga_osyo
Changed to use `#pos` `#event` `#tok` `#state` since using Lexer::Elem#[0~4] now gives a warning. see:
2021-12-24[ruby/irb] irb_info codepage mismatchYO4
`chcp` returns different encoding
2021-12-20[ruby/irb] Add East Asian Ambiguous Width to irb_info commandaycabta
2021-12-03[ruby/irb] Examine indentation of in keyword when trying to type includeKaíque Kandy Koga
Use in_keyword_case_scope? Return fast
2021-12-03[ruby/irb] Add Alt+d keycode when convert-meta isn't usedima1zumi
I pushed reline#389 for when convert-meta is not turned on in .inputrc. Alt+D in irb also needs to be set to the keycode for not using convert-meta.
2021-12-03[ruby/irb] Fix bug infinite loop when pasting multilines fo code in Ruby 2.6manga_osyo
Fix bug infinite loop when pasting multilines fo code in Ruby 2.6. This is not reproduced in Ruby 2.7. Changes added in are also reflected in Ruby 2.6.
2021-12-02Compatibility with IRBschneems
Instead of accessing the struct as an array, access it via methods. There are other places inside of this file already using this API (for example This commit moves all struct array-ish calls to use their method calls instead. It is also ~1.23 faster accessing values via a method instead of as an array according to this microbenchmark: ```ruby Elem =, :event, :tok, :state, :message) do def initialize(pos, event, tok, state, message = nil) super(pos, event, tok,, message) end # ... def to_a a = super a.pop unless a.empty? a end end class ElemClass attr_accessor :pos, :event, :tok, :state, :message def initialize(pos, event, tok, state, message = nil) @pos = pos @event = event @tok = tok @state = @message = message end def to_a if @message [@pos, @event, @tok, @state, @message] else [@pos, @event, @tok, @state] end end end # stub state class creation for now class State; def initialize(val); end; end ``` ```ruby Benchmark.ips do |x|"struct") { struct[1] }"class ") { from_class.event }! end; nil ``` ``` Warming up -------------------------------------- struct 1.624M i/100ms class 1.958M i/100ms Calculating ------------------------------------- struct 17.139M (± 2.6%) i/s - 86.077M in 5.025801s class 21.104M (± 3.4%) i/s - 105.709M in 5.015193s Comparison: class : 21103826.3 i/s struct: 17139201.5 i/s - 1.23x (± 0.00) slower ``` Notes: Merged:
2021-10-13[ruby/irb] Ignore parenthesis during completionKaíque Kandy Koga
Rename method
2021-10-11[ruby/irb] Add help about extra doc dir optionaycabta
2021-10-11[ruby/irb] Add --extra-doc-dir option to show doc dialogaycabta
2021-10-11[ruby/irb] Add periods to docaycabta
2021-10-11[ruby/irb] Set default return_formataycabta
2021-10-10[ruby/irb] Revert "Optimize show_source command further"Takashi Kokubun
This reverts commit 27dd2867cda5c789efaa5078214ad2fd82adcebf. This is to fix the test I added. (I separated commits to test a new behavior of ruby-commit-hook)
2021-10-09[ruby/irb] Version 1.3.8.pre.11aycabta
2021-10-09[ruby/irb] Update dependency, reline >= 0.2.8.pre.11aycabta
2021-10-08[ruby/irb] Determine left and right when the width of either side is zero ↵aycabta
2021-10-08[ruby/irb] Calculate right side doc dialog width correctlyaycabta
2021-10-08[ruby/irb] Specify whether to show the doc dialog on the left or right side ↵aycabta
by using variable names
2021-10-08[ruby/irb] Display doc dialog in gaps on narrow screenaycabta
2021-10-07[ruby/irb] Update descriptions of methodsKaíque Kandy Koga
From Reidline to Reline Update description used in take_corresponding_syntax_to_kw_do and is_the_in_correspond_to_a_for methods Use possessive noun correctly Second element
2021-10-07[ruby/irb] Make IRB::Context#exit call super if UncaughtThrowErrorJeremy Evans
Fixes calling exit after binding.irb. Fixes [Bug #18234]
2021-10-03[ruby/irb] Remove `require` in signal handler to avoid ThreadErrorMasataka Pocke Kuwabara
`rdoc` has been required so it looks unnecessary
2021-10-03[ruby/irb] Version 1.3.8.pre.10aycabta
2021-10-03[ruby/irb] Update dependency, reline >= 0.2.8.pre.10aycabta
2021-09-27[ruby/irb] Add doc about "echo on assignment"aycabta
2021-09-27[ruby/irb] Add blank lines to sample code in doc for readabilityaycabta
2021-09-27[ruby/irb] Fix sample code in docaycabta
2021-09-27[ruby/irb] Add a space before left parenaycabta
2021-09-24[ruby/irb] Revert "Show original string byte sequence to debug"aycabta
This reverts commit b42fe5937ab2a605a198ffb866db5ccda541568d.
2021-09-24[ruby/irb] Show original string byte sequence to debugaycabta
2021-09-23Revert "Show original string byte sequence to debug"aycabta
This reverts commit b42fe5937ab2a605a198ffb866db5ccda541568d.
2021-09-23[ruby/irb] Ignore any encoding errors while symbol completionNobuyoshi Nakada
2021-09-23Show original string byte sequence to debugaycabta
2021-09-22[ruby/irb] Use typed spaces when the line is inside the here documentsKaíque Kandy Koga
Use first method instead of square brackets to support 2.5 and 2.6 versions Use tokens Clear check_newline_depth_difference
2021-09-21[ruby/irb] Sort shortest files in each load pathsNobuyoshi Nakada
There are two directories where csv*/**/*.rb exist, lib/ and test/, and depending on the order of tests, test/ may be placed before lib/. In that case, as "shortest" names were not sorted, csv/helper.rb will be the first candidate for "csv".
2021-09-21[ruby/irb] Check if Gem::Specification is definedNobuyoshi Nakada
2021-09-11[ruby/irb] Ignore invalid 3 colons in completionaycabta
2021-09-10[ruby/irb] Version 1.3.8.pre.9aycabta
2021-09-10[ruby/irb] Update dependency, reline >= 0.2.8.pre.9aycabta