summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2020-08-26Fixed error messages at non-ascii %string terminatorNobuyoshi Nakada
2020-08-21Fixup 3292f4d965845d543733559fd1736b8c42fadab3Hiroshi SHIBATA
2020-08-21Fixed the executable path for erb commandHiroshi SHIBATA
2020-08-20Skip irb/test_history on Windows tooaycabta
2020-08-19Fix ObjectSpace.trace_object_allocations_stop to not raise if the tracepoint ↵Jean Boussier
were not initialized Notes: Merged: https://github.com/ruby/ruby/pull/3001
2020-08-19register_fstring: avoid duping the passed string when possibleJean Boussier
If the passed string is frozen, bare and not shared, then there is no need to duplicate it. Ref: 4ab69ebbd7cef8539f687e1f948845d076461dc6 Ref: https://bugs.ruby-lang.org/issues/11386 Notes: Merged: https://github.com/ruby/ruby/pull/3430
2020-08-19Skip Editline for history tests of IRBaycabta
Because Editline erases all histories in Readline::HISTORY when Readline.readline is called.
2020-08-19Skip irb/test_history on Solarisaycabta
2020-08-18Reset object allocation trace informationAaron Patterson
Compaction makes collisions in the weak map more likely. For now, clear the tracing information before the test run so we get accurate results
2020-08-19Use "in" and "out" options of "system" instead of "replace_stdio"aycabta
2020-08-18Update references when tracing allocationsAaron Patterson
The allocation tracing code keeps essentially a weak reference to objects that have been allocated (storing the allocation information along with the weak ref). Compacting the heap would break references in this weak map, so the wrong values could be returned. This commit just updates the values in the weak ref in order to fix the allocation tracing book keeping Notes: Merged: https://github.com/ruby/ruby/pull/3429
2020-08-19Do "write" to temp stdin before "reopen"aycabta
2020-08-18test/irb/test_history.rb: prevent warningsYusuke Endoh
``` /home/chkbuild/chkbuild/tmp/build/20200818T123003Z/ruby/test/irb/test_history.rb:16: warning: assigned but unused variable - result_output /home/chkbuild/chkbuild/tmp/build/20200818T123003Z/ruby/test/irb/test_history.rb:34: warning: assigned but unused variable - result_output /home/chkbuild/chkbuild/tmp/build/20200818T123003Z/ruby/test/irb/test_history.rb:57: warning: assigned but unused variable - result_output /home/chkbuild/chkbuild/tmp/build/20200818T123003Z/ruby/test/irb/test_history.rb:80: warning: assigned but unused variable - result_output ```
2020-08-18Lounch external process on Windows correctlyaycabta
2020-08-18[ruby/irb] Change the way the IRB is invoked as an external processaycabta
https://github.com/ruby/irb/commit/f4bcdf4375
2020-08-18[ruby/reline] Keep original characters in inputrcaycabta
https://github.com/ruby/reline/commit/96583c6336
2020-08-18[ruby/reline] Support mode iconMark Delk
Co-authored-by: aycabta <aycabta@gmail.com> https://github.com/ruby/reline/commit/067b618123
2020-08-18[ruby/reline] Call #start_terminal after generating temporary inputrcaycabta
because inputrc will be read when starting up https://github.com/ruby/reline/commit/0a30464385
2020-08-18[ruby/reline] Use single quotes for non-expanded string literalsaycabta
https://github.com/ruby/reline/commit/3bf7c7d722
2020-08-18[ruby/reline] Use temporary dir with yamatanooroti testaycabta
https://github.com/ruby/reline/commit/8d7df88e98
2020-08-18[ruby/irb] Support shortening lambda notetion for nesting level of promptaycabta
https://github.com/ruby/irb/commit/f1a775af47
2020-08-18[ruby/irb] Support shortening lambda notationaycabta
https://github.com/ruby/irb/commit/8e3f81d428
2020-08-18[ruby/irb] Add require 'irb' to test separatelyaycabta
https://github.com/ruby/irb/commit/9e4423b6e1
2020-08-18[ruby/irb] Make history infinite if set SAVE_HISTORY to negativeaycabta
https://github.com/ruby/irb/commit/824473e880
2020-08-18[ruby/irb] Suppress crash when bignum is set to SAVE_HISTORYaycabta
https://github.com/ruby/irb/commit/5044eb2730
2020-08-18[ruby/irb] Add tests about IRB historyaycabta
https://github.com/ruby/irb/commit/82efd370eb
2020-08-18[ruby/irb] Support oneline method definitionaycabta
https://github.com/ruby/irb/commit/826ae909c9
2020-08-18test/fiber/test_backtrace.rb: prevent a warningYusuke Endoh
``` /home/chkbuild/chkbuild/tmp/build/20200818T033004Z/ruby/test/fiber/test_backtrace.rb:9: warning: ambiguous first argument; put parentheses or a space even after `/' operator /home/chkbuild/chkbuild/tmp/build/20200818T033004Z/ruby/test/fiber/test_backtrace.rb:15: warning: ambiguous first argument; put parentheses or a space even after `/' operator ```
2020-08-18Disable debugging test.Koichi Sasada
``` 1) Failure: TestObjSpace#test_trace_object_allocations [/tmp/ruby/v3/src/trunk-gc_compact/test/objspace/test_objspace.rb:175]: <nil> expected but was <"/tmp/ruby/v3/src/trunk-gc_compact/test/objspace/test_objspace.rb">. ``` @tenderlove will re-enable it soon.
2020-08-17Fix method name escaping in ObjectSpace.dumpJohn Hawthorn
It's possible to define methods with any name, even if the parser doesn't support it and it can only be used with ex. send. This fixes an issue where invalid JSON was output from ObjectSpace.dump when a method name needed escaping. Notes: Merged: https://github.com/ruby/ruby/pull/3383
2020-08-17Ensure the shortcut cached in the classNobuyoshi Nakada
As well as the other places using RCLASS_IV_INDEX_TBL. `IO#reopen` seems the only case that the class of an object can be changed.
2020-08-17Also escape DEL codeNobuyoshi Nakada
2020-08-17Fixed the radix for control charsNobuyoshi Nakada
2020-08-18Expose ec -> backtrace (internal) and use it to implement fiber backtrace.Samuel Williams
See <https://bugs.ruby-lang.org/issues/16815> for more details. Notes: Merged: https://github.com/ruby/ruby/pull/3422
2020-08-16Remove the deprecated override of Kernel#open in open-uriJeremy Evans
This was deprecated in 2.7 to resolve [Misc #15893]. Notes: Merged: https://github.com/ruby/ruby/pull/3377
2020-08-13rb_str_{index,rindex}_m: Handle /\K/ in patternKasumi Hanazuki
When the pattern Regexp given to String#index and String#rindex contain a /\K/ (lookbehind) operator, these methods return the position where the beginning of the lookbehind pattern matches, while they are expected to return the position where the \K matches. ``` # without patch "abcdbce".index(/b\Kc/) # => 1 "abcdbce".rindex(/b\Kc/) # => 4 ``` This patch fixes this problem by using BEG(0) instead of the return value of rb_reg_search. ``` # with patch "abcdbce".index(/b\Kc/) # => 2 "abcdbce".rindex(/b\Kc/) # => 5 ``` Fixes [Bug #17118] Notes: Merged: https://github.com/ruby/ruby/pull/3414
2020-08-13rb_str_{partition,rpartition}_m: Handle /\K/ in patternKasumi Hanazuki
When the pattern given to String#partition and String#rpartition contain a /\K/ (lookbehind) operator, the methods return strings sliced at incorrect positions. ``` # without patch "abcdbce".partition(/b\Kc/) # => ["a", "c", "cdbce"] "abcdbce".rpartition(/b\Kc/) # => ["abcd", "c", "ce"] ``` This patch fixes the problem by using BEG(0) instead of the return value of rb_reg_search. ``` # with patch "abcdbce".partition(/b\Kc/) # => ["ab", "c", "dbce"] "abcdbce".rpartition(/b\Kc/) # => ["abcdb", "c", "e"] ``` As a side-effect this patch makes String#partition 2x faster when the pattern is a costly Regexp by performing Regexp search only once, which was unexpectedly done twice in the original implementation. Fixes [Bug #17119] Notes: Merged: https://github.com/ruby/ruby/pull/3413
2020-08-12Fix corruption in ARGF.inplacePeter Zhu
Extension string stored in `ARGF.inplace` is created using an api designed for C string constants to create a Ruby string that points at another Ruby string. When the original string is swept, the extension string gets corrupted. Reproduction script (on MacOS): ```ruby #!/usr/bin/ruby -pi.bak BEGIN { GC.start(full_mark: true) arr = [] 1000000.times do |x| arr << "fooo#{x}" end } puts "hello" ``` Co-Authored-By: Matt Valentine-House <31869+eightbitraptor@users.noreply.github.com> Notes: Merged: https://github.com/ruby/ruby/pull/3409 Merged-By: nobu <nobu@ruby-lang.org>
2020-08-12string.c(rb_str_split_m): Handle /\K/ correctlyKasumi Hanazuki
Use BEG(0) instead of the result of rb_reg_search to handle the cases when the separator Regexp contains /\K/ (lookbehind) operator. Fixes [Bug #17113] Notes: Merged: https://github.com/ruby/ruby/pull/3407
2020-08-11Test out fix for OpenSSL test flakinessAlan Wu
`OpenSSL::TestX509Store#test_verify` has been failing intermittently on CI about once a day: - http://ci.rvm.jp/results/trunk-random2@phosphorus-docker/3121244 - http://ci.rvm.jp/results/trunk-random1@phosphorus-docker/3117661 - http://ci.rvm.jp/results/trunk-random1@phosphorus-docker/3111684 According to the test: > OpenSSL uses time(2) while Time.now uses clock_gettime(CLOCK_REALTIME), > and there may be difference. This difference is could be the cause for the flaky failures. Let's see if giving the certificate more room solves the problem. In any case, I will revert this in a week. I think changes to these should go to https://github.com/ruby/openssl/? Notes: Merged: https://github.com/ruby/ruby/pull/3406
2020-08-11Enable s390x invokebuiltin JIT test againTakashi Kokubun
2020-08-07Add more debug info to test_verifyKazuhiro NISHIYAMA
http://ci.rvm.jp/results/trunk-random1@phosphorus-docker/3111684
2020-08-06Add verbose message to random failed assertionKazuhiro NISHIYAMA
for example: http://ci.rvm.jp/results/trunk-random1@phosphorus-docker/3111251 http://ci.rvm.jp/results/trunk-random1@phosphorus-docker/3109195
2020-08-06[Feature #16513] TracePoint#inspect returns "... file:line" (#3391)Nguyễn Quang Minh
* Fix debug documents to match Thread#to_s change (Feature #16412 ticket) * TracePoint#inspect returns "... file:line" (Feature #16513) * Guard older version of Ruby in Tracepoint inspection tests * Focus on current thread only when running TracePoint inspection test Notes: Merged-By: ko1 <ko1@atdot.net>
2020-08-06Apply timeout-scale to test_thr_kill.Jun Aruga
Notes: Merged: https://github.com/ruby/ruby/pull/3380
2020-08-03[ruby/net-http] Fix SSL session reuse test with LibreSSL 3.2+Jeremy Evans
https://github.com/ruby/net-http/commit/5ae9620fbc
2020-08-03[ruby/net-http] Switch invalid server name formatJeremy Evans
invalid_servername is not a valid name in an SSL request due to the use of the underscore, and LibreSSL 3.2.0 will raise an exception for this. These tests are not testing the allowed characters in the server name, but how net/http handles cases where the server name provided does not match the IP address you are trying to connect to, so I think it's better to just modify the tests to use a correct format. While here, fix a typo in a test name, and use better code in the ensure block so the same test doesn't issue both a failure and an error. https://github.com/ruby/net-http/commit/0e8dc91120
2020-07-31[rubygems/rubygems] Enable `Layout/LeadingEmptyLines` in rubygemsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/9c17f220af Notes: Merged: https://github.com/ruby/ruby/pull/3379
2020-07-31[rubygems/rubygems] Fix some intermittent test failures on trufflerubyDavid Rodríguez
Since they changed their default to not generate documentation on `gem install`, we're getting some intermittent test failures. Can be reproduced with: ``` TRUFFLERUBYOPT="--experimental-options --testing-rubygems" TESTOPTS=--name="/^\(?:TestGemGemRunner#\(?:test_list_succeeds\)\|TestGemCommandsUpdateCommand#\(?:test_handle_options_system\)\)$/ --seed=54277 --verbose" rake ``` Fix it by resetting all permanent CLI options when CLI runner loads configuration. https://github.com/rubygems/rubygems/commit/7d896f4b74 Notes: Merged: https://github.com/ruby/ruby/pull/3379
2020-07-31[rubygems/rubygems] Setup no longer generates formatted executables by defaultDavid Rodríguez
Catch up with that change in `gem update --system` tests. https://github.com/rubygems/rubygems/commit/127ba14344 Notes: Merged: https://github.com/ruby/ruby/pull/3379