summaryrefslogtreecommitdiff
path: root/test/irb
AgeCommit message (Collapse)Author
2021-12-21[ruby/irb] Check colorize option correctly to clear char attr and don't use ↵aycabta
it for tests https://github.com/ruby/irb/commit/de561cafeb
2021-12-20[ruby/irb] Remove unnecessary space in regexpaycabta
https://github.com/ruby/irb/commit/c24a8e2483
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-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-11-05Skip TestIRB::TestInit#test_recovery_sigint on SolarisYusuke Endoh
The test randomly gets stuck on Solaris: http://rubyci.s3.amazonaws.com/solaris11-sunc/ruby-master/log/20211105T060014Z.fail.html.gz ``` 1) Error: TestIRB::TestInit#test_recovery_sigint: Timeout::Error: execution of assert_in_out_err expired timeout (100.0 sec) pid 3195 killed by SIGTERM (signal 15) | Switch to inspect mode. | exit | ``` I investigated the issue but I couldn't figure it out. This random failure is noisy, which makes it difficult to track the CI. So I skip the test on Soalris. Contribution is welcome.
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] Set default return_formataycabta
https://github.com/ruby/irb/commit/7ee15bc668
2021-10-11[ruby/irb] Clean up a duplicated definitionTakashi Kokubun
I simply forgot deleting it. https://github.com/ruby/irb/commit/65399d5e9f
2021-10-10[ruby/irb] trufflruby fails on the show_source testTakashi Kokubun
https://github.com/ruby/irb/commit/460bd12b87
2021-10-10[ruby/irb] Add a test of find_end for show_source commandTakashi Kokubun
https://github.com/ruby/irb/commit/68e6ca95a0
2021-10-08[ruby/irb] Add tests for truncated show doc dialogaycabta
But pending them now because they need dummy document data to show doc. https://github.com/ruby/irb/commit/ac471ee14e
2021-09-24Pend test_complete_require_library_name_firstaycabta
2021-09-23[ruby/irb] Ignore any encoding errors while symbol completionNobuyoshi Nakada
https://github.com/ruby/irb/commit/daa65cded1
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] Fix argument orderNobuyoshi Nakada
https://github.com/ruby/irb/commit/05c65858a0
2021-09-11[ruby/irb] Ignore invalid 3 colons in completionaycabta
https://github.com/ruby/irb/commit/5e29e3e39c
2021-09-10[ruby/irb] Tests may not execute in the source directoryNobuyoshi Nakada
https://github.com/ruby/irb/commit/f4aaa70cfc
2021-09-10Find irb command path in testaycabta
2021-09-10[ruby/irb] Pend on trufflerubyaycabta
https://github.com/ruby/irb/commit/fbf52d9608
2021-09-10[ruby/irb] Remove an unused variableaycabta
https://github.com/ruby/irb/commit/5bf1cb2078
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] Add yamatanooroti test for symbol with backtickaycabta
https://github.com/ruby/irb/commit/4d32f0e88e
2021-09-10[ruby/irb] Support symbol with backtickaycabta
https://github.com/ruby/irb/commit/0aa2425883
2021-09-08[ruby/irb] Use "csv" for testaycabta
The "csv" doesn't conflict with other stdlib names in any Ruby processing system. https://github.com/ruby/irb/commit/49203a1c83
2021-09-08[ruby/irb] Show lib name first because it's the most common use caseaycabta
https://github.com/ruby/irb/commit/74d635758b
2021-09-04[ruby/irb] Suppress "assigned but unused variable" warningaycabta
https://github.com/ruby/irb/commit/a1ddf64c69
2021-09-04[ruby/irb] Add an assertion to check completion "var.method" to get correct ↵aycabta
"class.method" https://github.com/ruby/irb/commit/cc1ddb37a9
2021-09-04[ruby/irb] Retrieve completed receiver that is a module or class correctlyaycabta
https://github.com/ruby/irb/commit/b2324727e1
2021-09-04[ruby/irb] Use autocomplete with show doc dialog that uses Reline::Key in testsaycabta
https://github.com/ruby/irb/commit/142fc53e9c
2021-09-03[ruby/irb] Add TODO comment to remove disabling autocomplete lateraycabta
https://github.com/ruby/irb/commit/856f001b60
2021-09-03[ruby/irb] Disable autocomplete in yamatanooroti testaycabta
https://github.com/ruby/irb/commit/cb9c9c64df
2021-09-02[ruby/irb] Detect the variable class to show docaycabta
https://github.com/ruby/irb/commit/33b9bec954
2021-08-30[ruby/irb] Relax backtrace nest levelsNobuyoshi Nakada
https://github.com/ruby/irb/commit/fb637bc68f
2021-08-30[ruby/irb] Added the extra stdout message with test-unitHiroshi SHIBATA
https://github.com/ruby/irb/commit/b153d587a1
2021-08-30[ruby/irb] Use capture_output instead of capture_ioHiroshi SHIBATA
https://github.com/ruby/irb/commit/077e4ae7de
2021-08-30[ruby/irb] Use pend instead of skipHiroshi SHIBATA
https://github.com/ruby/irb/commit/f441ce35bf
2021-08-30Add --autocomplete / --noautocomplete optionsaycabta
2021-08-30[ruby/irb] Remove path settings for debuggingaycabta
https://github.com/ruby/irb/commit/48029944a5
2021-07-16[ruby/irb] Show code page by irb_info on Windowsaycabta
https://github.com/ruby/irb/commit/6160d74199
2021-07-16[ruby/irb] Escape space in free-spacing modeaycabta
https://github.com/ruby/irb/commit/085ac42947
2021-07-11[ruby/irb] Show LANG and LC_ALL env by irb_infoaycabta
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org> https://github.com/ruby/irb/commit/b431742430
2021-06-30[ruby/irb] Fix error on `ls object_cant_define_singleton`Masataka Pocke Kuwabara
such as `ls 42`, `ls :sym` and so on https://github.com/ruby/irb/commit/b1d436a853
2021-06-23Strip trailing spacesNobuyoshi Nakada
2021-06-22[ruby/irb] Sort ls result ordered by anscestryKeiko Kaneko
https://github.com/ruby/irb/commit/fdd5c0a71e
2021-05-24Set USE_COLORIZE to the default value in a testaycabta
2021-05-24[ruby/irb] update test/irb/test_init.rb to avoid useless evaljethrodaniel
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org> https://github.com/ruby/irb/commit/2dfdc031ec
2021-05-24[ruby/irb] respect NO_COLOR environment variableMark Delk
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
2021-05-18test/irb/test_raise_no_backtrace_exception.rb: fix test file pathNobuyoshi Nakada
Create a file for test under the temporary directory.
2021-05-11test/irb/test_raise_no_backtrace_exception.rb: Set LC_MESSAGES as UTF-8Yusuke Endoh