aboutsummaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Remove conflict resolution mistake [ci skip]Takashi Kokubun2019-06-041-2/+2
| | | | in de541fe1961370e64541d73c96cf790d30f28604 :bow:
* Improve test_color to prevent regressionTakashi Kokubun2019-06-041-2/+1
| | | | | Actually de541fe1961370e64541d73c96cf790d30f28604 was still needed. This commit would improve the test coverage using the branch.
* colorize_code must return escaped textTakashi Kokubun2019-06-041-2/+3
| | | | | This was needed before 0c459af7c233adb5f44022350bfe8fa132d8053e but it could be actually useless now. But I added this anyway just in case.
* Colorize error charactersNobuyoshi Nakada2019-06-041-8/+5
| | | | | | * lib/irb/color.rb (IRB::Color.scan): ignore "incomplete end of input" error only, to colorize invalid characters, e.g., control characters, and invalid symbols, as errors.
* Fix the error token on "invalid hex escape"Nobuyoshi Nakada2019-06-032-1/+11
| | | | | * parse.y (tok_hex): flush token after dispatching the "invalid hex escape" parse error.
* Make size on an infinite each_slice enumerator return InfinityJeremy Evans2019-06-021-0/+5
| | | | Fixes [Bug #15889]
* Use lines instead of splitKazuhiro NISHIYAMA2019-06-031-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ``` % cat ~/bench-split.yml prelude: | s = "foo\nbar\nbaz\n" benchmark: '/(?<=\n)/': | s.split(/(?<=\n)/) '/^/': | s.split(/^/) 'lines': | s.lines Warming up -------------------------------------- /(?<=\n)/ 459.123k i/s - 467.844k times in 1.018994s (2.18μs/i) /^/ 467.922k i/s - 469.744k times in 1.003894s (2.14μs/i) lines 2.343M i/s - 2.424M times in 1.034677s (426.84ns/i) Calculating ------------------------------------- /(?<=\n)/ 422.347k i/s - 1.377M times in 3.261232s (2.37μs/i) /^/ 477.603k i/s - 1.404M times in 2.939186s (2.09μs/i) lines 2.485M i/s - 7.028M times in 2.828757s (402.47ns/i) Comparison: lines: 2484631.6 i/s /^/: 477603.3 i/s - 5.20x slower /(?<=\n)/: 422346.5 i/s - 5.88x slower ```
* The C-q is also quoted insert in emacs modeaycabta2019-06-031-0/+13
|
* Add aliases for commands for moving macroaycabta2019-06-031-0/+11
|
* Close leaked file descripters in testsaycabta2019-06-032-1/+7
|
* The ed_move_to_beg is different from vi_first_printaycabta2019-06-032-1/+29
|
* Fix ArgumentError in aliased macroNobuyoshi Nakada2019-06-031-0/+34
| | | | Closes: https://github.com/ruby/ruby/pull/2221
* Check conditional nestings in INPUTRCNobuyoshi Nakada2019-06-021-0/+27
| | | | Closes: https://github.com/ruby/ruby/pull/2222
* Use simpler regexpKazuhiro NISHIYAMA2019-06-021-6/+6
|
* Add true condition `Reline`Nobuyoshi Nakada2019-06-021-10/+12
|
* Add Reline test for unknown macroaycabta2019-06-021-0/+6
|
* Add new test for Reline within pipeaycabta2019-06-021-0/+24
|
* Update String#crypt tests to work on OpenBSDJeremy Evans2019-06-013-8/+33
| | | | | | | Skip the webrick httpauth tests that use crypt when testing on OpenBSD. Fixes [Bug #11363]
* Ignore warnings about mismatched indentations.Hiroshi SHIBATA2019-06-012-2/+2
|
* Ignore warnings about argument prefix with operator symbol.Hiroshi SHIBATA2019-06-013-10/+10
|
* Ignore warnings about ambiguous first argument with the negative integer.Hiroshi SHIBATA2019-06-012-18/+18
|
* Ignore warnings about ambiguous first argument of regexp with assert match.Hiroshi SHIBATA2019-06-014-16/+16
|
* Merge rubygems master from upstream.Hiroshi SHIBATA2019-06-0137-584/+734
| | | | I picked the commit from 3c469e0da538428a0ddd94f99aa73c32da22e8ba
* Reset Config at Reline::Config::Test#teardownaycabta2019-06-011-0/+1
|
* Use inputrc data for keystroke settingaycabta2019-06-012-25/+35
|
* Fix FrozenError when assigning frozen class to constantNobuyoshi Nakada2019-06-011-0/+2
| | | | | * variable.c (set_namespace_path): modules/classes can get named by assignment to constant, even if frozen. [Bug #15891]
* Keep vm->orig_progname aliveAlan Wu2019-05-311-0/+8
| | | | | | | | `vm->orig_progname` can be different from `vm->progname` when user code assigns to `$0`. While `vm->progname` is kept alive by the global table, nothing marked `vm->orig_progname`. [Bug #15887]
* Fix visibility of some methods when using DelegateClassJeremy Evans2019-05-301-0/+31
| | | | | | | | | | | | | | | | Public instance methods added to a delegated class after the creation of the delegate class were not returned by the public_instance_methods class method of the delegate class. Protected instance methods in the delegated class when the delegate class is created were returned by the public_methods instance method of the delegate class. Patch mostly from Kenichi Kamiya <kachick1@gmail.com> in GitHub pull request 926. Minor changes to get it to apply, and to fix tests after applying by me. Fixes [Bug #11512]
* Allow DelegateClass() to module_eval given blockJeremy Evans2019-05-301-0/+7
| | | | | | | | | | Methods that return classes often module_eval the given block (e.g. Class.new and Struct.new). This allows DelegateClass to work similarly. This makes it easier to use DelegateClass directly without subclassing, so as not to create an unnecessary subclass. Implements [Feature #15842]
* Warn compile_error only when input is finishedTakashi Kokubun2019-05-311-3/+31
| | | | | | | | | | | | | | | | | | | | Let's say we are in progress to write `"foo"`: ``` irb> "fo ``` at this moment, nothing is wrong. It would be just a normal way to write `"foo"`. Prior to this commit, the `fo` part was warned because of 5b64d7ac6e7cbf759b859428f125539e58bac0bd. But I think warning such a normal input is not valuable for users. However, we'd like to warn `:@1` or `@@1` which is also a syntax error. Then this commit switches the syntax highlight based on whether the input text is finished or not. When it's not finished yet, it does not warn compile_error.
* parse.y: adjust here-doc error tokenNobuyoshi Nakada2019-05-301-3/+7
| | | | | | * parse.y (here_document): adjust token to the here-doc identifier in compile_error when a here-document misses the closing identifier.
* Include stack elements left after errorsNobuyoshi Nakada2019-05-301-0/+22
|
* parse.y: continue after heredoc errorNobuyoshi Nakada2019-05-301-0/+6
| | | | | * parse.y: continue parsing the rest of the here-document starting line, after the terminator was not found.
* Colorize errors moreNobuyoshi Nakada2019-05-291-0/+1
| | | | | * lib/irb/color.rb (IRB::Color.colorize_code): colorize `compile_error` part as same as `on_parse_error`.
* parse.y: fix state after ivar/cvarNobuyoshi Nakada2019-05-291-0/+18
| | | | | * parse.y (parse_atmark): return EXPR_END or EXPR_ENDFN, depending on the previous state, even incomplete names consistently.
* Colorize compile_error as same as on_parse_errorNobuyoshi Nakada2019-05-291-1/+1
|
* parse.y: flush invalid charNobuyoshi Nakada2019-05-291-1/+10
|
* test/rubygems/test_gem_stream_ui.rb (test_ask_for_password): extend the timeoutYusuke Endoh2019-05-291-1/+1
| | | | | | for Solaris. https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable10s/ruby-master/log/20190528T191908Z.fail.html.gz
* Remove extra items because Reline::HISTORY is a sized queueaycabta2019-05-291-0/+28
|
* Revert 3b7862c8e88cd7838a53ec083ac5733386400956 causing various CI hangsTakashi Kokubun2019-05-293-34/+5
| | | | | | | | | | | | | | | | | | | | | and dependent commits c67934b1c3b40dda5f170b032423e520511c68dd and f0d1dc5cee87dfb023cb43a2db9bcdef5a8dee8f. RubyCI and ci.rvm.jp are almost dead by timeout since this commit. --- Revert "Skip a reline test hanging on Wercker since 3b7862c8e8" This reverts commit f0d1dc5cee87dfb023cb43a2db9bcdef5a8dee8f. Revert "Remove extra items because Reline::HISTORY is a sized queue" This reverts commit c67934b1c3b40dda5f170b032423e520511c68dd. Revert "Use existing instances for LineEditor and Config" This reverts commit 3b7862c8e88cd7838a53ec083ac5733386400956.
* Skip a reline test hanging on Wercker since 3b7862c8e8Takashi Kokubun2019-05-291-0/+1
| | | | like https://app.wercker.com/ruby/ruby/runs/mjit-test1/5cedad11105780001c4e7001?step=5cedaf6b48fad200076fe77b
* Remove extra items because Reline::HISTORY is a sized queueaycabta2019-05-291-0/+27
|
* Use existing instances for LineEditor and Configaycabta2019-05-292-5/+6
|
* parse.y: warn escaped whitespaceNobuyoshi Nakada2019-05-292-0/+27
| | | | | * parse.y (warn_space_char_code): warn whitespace characters escaped with meta/control prefix.
* Update the certificate files to make the test pass on Debian 10Yusuke Endoh2019-05-285-141/+281
| | | | | | | | | | | | | The old certificate files (for example, test/rubygems/ca_cert.pem) were signed by SHA1. This message digest is considered too weak and rejected by OpenSSL 1.1.1 or later. Because of this, the test suite does not pass on Debian 10. https://rubyci.org/logs/rubyci.s3.amazonaws.com/debian/ruby-master/log/20190527T123003Z.fail.html.gz#test%2Frubygems This change regenerates the files. A shell script for the regeneration (util/create_certs.sh) is also added.
* parse.y: numbered parameter symbolNobuyoshi Nakada2019-05-281-0/+5
| | | | | * parse.y (parse_atmark): numbered parameter name is not allowed as a symbol regardless the context.
* Use Reline.completer_quote_characters to completeaycabta2019-05-282-2/+0
|
* Colorize error partNobuyoshi Nakada2019-05-271-1/+3
|
* Do not make an incomplete escape a valid charNobuyoshi Nakada2019-05-271-1/+1
|
* Ripper#tokenNobuyoshi Nakada2019-05-271-4/+5
| | | | | * parse.y (ripper_token): added Ripper#token which returns the current token string. [EXPERIMENTAL]