aboutsummaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* 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]
* open-uri: Regenerate server certificates for testsYusuke Endoh2019-05-271-124/+217
| | | | | OpenSSL 1.1.1 requires 2048 bits or more. This change will fix: https://rubyci.org/logs/rubyci.s3.amazonaws.com/debian/ruby-master/log/20190527T003004Z.fail.html.gz#test%2Fopen-uri
* context.rb: hide wrapping linesNobuyoshi Nakada2019-05-271-0/+5
| | | | | | * lib/irb/context.rb (IRB::Context#evaluate): separate the code from wrapping lines to propagate the given exception, not to show the wrapping lines when SyntaxError.
* Highlight global variable on IRBTakashi Kokubun2019-05-261-0/+1
|
* Add FrozenError#receiverJeremy Evans2019-05-261-0/+27
| | | | | | | | | | | | | | | | | Similar to NameError#receiver, this returns the object on which the modification was attempted. This is useful as it can pinpoint exactly what is frozen. In many cases when a FrozenError is raised, you cannot determine from the context which object is frozen that you attempted to modify. Users of the current rb_error_frozen C function will have to switch to using rb_error_frozen_object or the new rb_frozen_error_raise in order to set the receiver of the FrozenError. To allow the receiver to be set from Ruby, support an optional second argument to FrozenError#initialize. Implements [Feature #15751]
* Refactor IRB color dispatchTakashi Kokubun2019-05-261-1/+1
| | | | | | | | | | | | | | | The reason why we were checking lexer state in addition to token was that we do not want to colorize local variable, method call, etc., while they share the :on_ident token with a name of method definition which should be colored as blue. It means that we're concerned about the lexer state only for :on_ident. Thus we can skip checking lexer state for non-:on_ident tokens. This refactoring is based on that idea. Also, now we manage Ripper's lexer state as Integer (use `|` if you need to check multiple states). It should be faster than using Array of Integer because #any? block call is not needed.
* Support :@@cvar and : on colorizeaycabta2019-05-271-1/+1
|
* Make the imaginary color on IRB close to pryTakashi Kokubun2019-05-261-1/+1
| | | | and sorted the token names alphabetically.
* parse.y: broke the terminator condition downNobuyoshi Nakada2019-05-271-0/+2
| | | | | | | * parse.y (here_document): broke the terminator condition down into each piece, the positional condition, resetting the dedented here-document indentation, and matching identifier. suppress a false warning by icc.
* Colorize imaginary and rational literalsNobuyoshi Nakada2019-05-261-0/+2
|
* parse.y: adjust error indicatorNobuyoshi Nakada2019-05-262-1/+4
| | | | | | | | | | | | | | | | | * parse.y (parser_yylex): adjust the error indicator of unexpected fraction part. before: ~~~ 1.2.3 ^~~ ~~~ after: ~~~ 1.2.3 ^~ ~~~
* test/ruby/test_notimp.rb: Use EnvUtil.timeout for timeout scale factorNobuyoshi Nakada2019-05-261-1/+1
|
* test/ruby/test_process.rb: Use EnvUtil.timeout for timeout scale factorYusuke Endoh2019-05-261-4/+4
| | | | https://rubyci.org/logs/rubyci.s3.amazonaws.com/solaris11s-sunc/ruby-master/log/20190526T052508Z.fail.html.gz
* test/lib/envutil.rb (EnvUtil.timeout): added.Yusuke Endoh2019-05-262-3/+9
| | | | It is a wrapper for Timeout.timeout with the scale factor applied.
* Fix scanner event at invalid syntaxNobuyoshi Nakada2019-05-263-6/+21
| | | | | | * parse.y (parser_yyerror, parser_compile_error): revert r67224 (e5d10cda07b23682e5e4e64d1324e4d3247d4785) "Flush erred token".
* test/rubygems/test_gem_stream_ui.rb (test_ask): extend the timeoutYusuke Endoh2019-05-261-1/+1
| | | | | | for Solaris. https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable10s/ruby-master/log/20190525T211908Z.fail.html.gz
* Handle keyword symbol in IRB::Color::SymbolStateTakashi Kokubun2019-05-251-0/+1
|
* Deal with more syntax highlight edge casesTakashi Kokubun2019-05-251-1/+4
| | | | Please refer to the tests again.
* Fix more unintended syntax highlightsTakashi Kokubun2019-05-251-0/+12
| | | | See tests for what kind of things are fixed.
* Always color Symbol as Yellow on IRB::ColorTakashi Kokubun2019-05-251-2/+6
| | | | | | | | | | | | | | | | | | | Symbol color was made blue as a workaround because it was hard to distinguish `foo`s in `:foo` and `def foo; end` (both are :on_ident). But I wanted to make it yellow like pry. `:Struct` had the same problem in :on_const. Because the :on_const was also blue (but underlined and bold), it was not a big issue. While they're not so problematic since we got a workaround, we also had a more serious issue for highlighting a symbol like `:"a#{b}c"`. The first half was considered as Symbol and the last half was considered as String, because the colorizer did not have a state like a parser. To approach the last issue, I introduced `IRB::Color::SymbolState` which is a thin state manager knowing only "the token is Symbol or not". Having this module magically solves the first two problems as well. So now we can highlight Symbol as yellow in the perfect manner.
* test/ruby/test_rubyoptions.rb (test_script_from_stdin): scale timeoutYusuke Endoh2019-05-261-1/+2
| | | | | | for Solaris. https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable10s/ruby-master/log/20190525T131909Z.fail.html.gz
* Colorize empty embexpr more on IRB::ColorTakashi Kokubun2019-05-251-0/+1
|
* Support some unhandled syntax highlightTakashi Kokubun2019-05-251-0/+6
| | | | | | Heredoc, %i, :Foo, { 'a': ... }, ... :'a' is still half-broken.
* Clear IRB::Color escape sequence before newlineTakashi Kokubun2019-05-251-2/+16
| | | | because otherwise prompt and other things could be polluted.
* Add and use Reline::Unicode.escape_for_printTakashi Kokubun2019-05-251-0/+1
|
* Incremental syntax highlight for IRB source linesTakashi Kokubun2019-05-241-0/+3
| | | | Closes: https://github.com/ruby/ruby/pull/2202
* Avoid to show warning message with unused variable.Hiroshi SHIBATA2019-05-251-2/+2
|
* Support Meta key in Relineaycabta2019-05-242-34/+20
|
* Mixed encoding error can continue to parseNobuyoshi Nakada2019-05-242-4/+14
|
* test/ruby/test_gc.rb (test_gc_stress_at_startup): extend time timeoutYusuke Endoh2019-05-241-1/+1
| | | | | | It fails on some CI environments. https://rubyci.org/logs/rubyci.s3.amazonaws.com/debian8/ruby-trunk/log/20190524T003006Z.fail.html.gz https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11s/ruby-trunk/log/20190523T002505Z.fail.html.gz
* Test GC.compact with MJIT againTakashi Kokubun2019-05-231-3/+1
|
* Add `Time#ceil`.manga_osyo2019-05-231-0/+26
| | | | Closes: https://github.com/ruby/ruby/pull/2133
* Test GC.compact on MJIT againTakashi Kokubun2019-05-232-2/+0
|
* Adding Enumerable#filter_mapAlfonso Jiménez2019-05-232-1/+11
| | | | | [Feature #15323] Closes: https://github.com/ruby/ruby/pull/2017
* Fix mixed encoding in heredocJeremy Evans2019-05-221-0/+29
| | | | | | | | | Heredocs are parsed line-by-line, so we need to keep track of the temporary encoding of the string. Previously, a heredoc would only detect mixed encoding errors if they were on the same line, this changes things so they will be caught on different lines. Fixes [Bug #15839]
* Skip assertion in readline test if Readline version is 4.3Jeremy Evans2019-05-221-1/+3
| | | | | | | | | | | Previously, the entire method was not run for Readline 4.3, probably because it was known to fail. Commit c754e979d3eeca51f1b13778f19f347df3da656e removed the check for Readline 4.3. Other than this one assertion, which also doesn't work when using Reline, the method runs correctly when using Readline 4.3. Fixes [Bug #15853].