summaryrefslogtreecommitdiff
path: root/lib/irb
AgeCommit message (Collapse)Author
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. https://github.com/ruby/irb/commit/d54b271984
2022-01-17[ruby/irb] Use require_relative to load extensions/commandsst0012
https://github.com/ruby/irb/commit/d5060f7668
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`. https://github.com/ruby/irb/commit/848d339f2e
2021-12-29[ruby/irb] Prefer `IO#wait_readable` over `IO#select`. ↵Samuel Williams
(https://github.com/ruby/irb/pull/323) https://github.com/ruby/irb/commit/1c03bd3373
2021-12-25[ruby/irb] Version 1.4.1aycabta
https://github.com/ruby/irb/commit/b1d9c34441
2021-12-25[ruby/irb] Support showing doc by dialog in iTerm2aycabta
https://github.com/ruby/irb/commit/a4b95d6634
2021-12-25[ruby/irb] Version 1.4.0aycabta
https://github.com/ruby/irb/commit/b80ec5821e
2021-12-25[ruby/irb] Update dependency, reline >= 0.3.0aycabta
https://github.com/ruby/irb/commit/f36ad549c4
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: https://github.com/ruby/ruby/commit/8944009be7418614ce7d4077807ac2b60d4d5d85 https://github.com/ruby/reline/commit/9adbb9af32
2021-12-24[ruby/irb] irb_info codepage mismatchYO4
`chcp` returns different encoding https://github.com/ruby/irb/commit/f80971994a
2021-12-20[ruby/irb] Add East Asian Ambiguous Width to irb_info commandaycabta
https://github.com/ruby/irb/commit/4cade4b7e5
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 https://github.com/ruby/irb/commit/8acc7f8dc7
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. https://github.com/ruby/irb/commit/328eddf851
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 https://github.com/ruby/irb/pull/242/files#diff-612b926e42ed78aed1a889ac1944f7d22229b3a489cc08f837a7f75eca3d3399R155 are also reflected in Ruby 2.6. https://github.com/ruby/irb/commit/0a77f75bf0
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 https://github.com/ruby/ruby/blob/e0a5c3d2b71dfad038d7562fdd33f02ffd79232d/lib/irb/ruby-lex.rb#L829-L830). 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 = Struct.new(:pos, :event, :tok, :state, :message) do def initialize(pos, event, tok, state, message = nil) super(pos, event, tok, State.new(state), 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 = State.new(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| x.report("struct") { struct[1] } x.report("class ") { from_class.event } x.compare! 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: https://github.com/ruby/ruby/pull/5093
2021-10-13[ruby/irb] Ignore parenthesis during completionKaíque Kandy Koga
Rename method https://github.com/ruby/irb/commit/619aecb412
2021-10-11[ruby/irb] Add help about extra doc dir optionaycabta
https://github.com/ruby/irb/commit/5018f2cb99
2021-10-11[ruby/irb] Add --extra-doc-dir option to show doc dialogaycabta
https://github.com/ruby/irb/commit/3f79cb506f
2021-10-11[ruby/irb] Add periods to docaycabta
https://github.com/ruby/irb/commit/6330601629
2021-10-11[ruby/irb] Set default return_formataycabta
https://github.com/ruby/irb/commit/7ee15bc668
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) https://github.com/ruby/irb/commit/fe055d521a
2021-10-09[ruby/irb] Version 1.3.8.pre.11aycabta
https://github.com/ruby/irb/commit/49b9f644c2
2021-10-09[ruby/irb] Update dependency, reline >= 0.2.8.pre.11aycabta
https://github.com/ruby/irb/commit/4f686afbca
2021-10-08[ruby/irb] Determine left and right when the width of either side is zero ↵aycabta
correctly https://github.com/ruby/irb/commit/5df6e1f027
2021-10-08[ruby/irb] Calculate right side doc dialog width correctlyaycabta
https://github.com/ruby/irb/commit/f34da7fa04
2021-10-08[ruby/irb] Specify whether to show the doc dialog on the left or right side ↵aycabta
by using variable names https://github.com/ruby/irb/commit/a23a88b8c9
2021-10-08[ruby/irb] Display doc dialog in gaps on narrow screenaycabta
https://github.com/ruby/irb/commit/4d7cefcaa4
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 https://github.com/ruby/irb/commit/4fa9714d6f
2021-10-07[ruby/irb] Make IRB::Context#exit call super if UncaughtThrowErrorJeremy Evans
Fixes calling exit after binding.irb. Fixes [Bug #18234] https://github.com/ruby/irb/commit/4ea8d376f2
2021-10-03[ruby/irb] Remove `require` in signal handler to avoid ThreadErrorMasataka Pocke Kuwabara
`rdoc` has been required so it looks unnecessary https://github.com/ruby/irb/commit/5f749c613c
2021-10-03[ruby/irb] Version 1.3.8.pre.10aycabta
https://github.com/ruby/irb/commit/15bcbbb284
2021-10-03[ruby/irb] Update dependency, reline >= 0.2.8.pre.10aycabta
https://github.com/ruby/irb/commit/800e83eabd
2021-09-27[ruby/irb] Add doc about "echo on assignment"aycabta
https://github.com/ruby/irb/commit/5af637b3c1
2021-09-27[ruby/irb] Add blank lines to sample code in doc for readabilityaycabta
https://github.com/ruby/irb/commit/123b7e53ee
2021-09-27[ruby/irb] Fix sample code in docaycabta
https://github.com/ruby/irb/commit/642adbe968
2021-09-27[ruby/irb] Add a space before left parenaycabta
https://github.com/ruby/irb/commit/973bac83ff
2021-09-24[ruby/irb] Revert "Show original string byte sequence to debug"aycabta
This reverts commit b42fe5937ab2a605a198ffb866db5ccda541568d. https://github.com/ruby/irb/commit/b22094a16f
2021-09-24[ruby/irb] Show original string byte sequence to debugaycabta
https://github.com/ruby/irb/commit/7a97bb0e56
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
https://github.com/ruby/irb/commit/daa65cded1
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 https://github.com/ruby/irb/commit/6fec2a5d46
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". https://github.com/ruby/irb/commit/2af7c6bf71
2021-09-21[ruby/irb] Check if Gem::Specification is definedNobuyoshi Nakada
https://github.com/ruby/irb/commit/005ade74dd
2021-09-11[ruby/irb] Ignore invalid 3 colons in completionaycabta
https://github.com/ruby/irb/commit/5e29e3e39c
2021-09-10[ruby/irb] Version 1.3.8.pre.9aycabta
https://github.com/ruby/irb/commit/4781f67fb8
2021-09-10[ruby/irb] Update dependency, reline >= 0.2.8.pre.9aycabta
https://github.com/ruby/irb/commit/ab5d84c55b
2021-09-10[ruby/irb] Move IRB::TOPLEVEL_BINDING from exe/irb to lib/irb/workspace.rbaycabta
https://github.com/ruby/irb/commit/e736a77076
2021-09-10[ruby/irb] Avoid loading files' local variables [Bug #17623]Marc-Andre Lafortune
https://github.com/ruby/irb/commit/b12f0cb8e2
2021-09-10[ruby/irb] Support symbol with backtickaycabta
https://github.com/ruby/irb/commit/0aa2425883