aboutsummaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Skip irb/test_history on Solarisaycabta2020-08-191-1/+1
|
* Reset object allocation trace informationAaron Patterson2020-08-181-0/+1
| | | | | Compaction makes collisions in the weak map more likely. For now, clear the tracing information before the test run so we get accurate results
* Use "in" and "out" options of "system" instead of "replace_stdio"aycabta2020-08-191-28/+1
|
* Update references when tracing allocationsAaron Patterson2020-08-181-1/+1
| | | | | | | | | | 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
* Do "write" to temp stdin before "reopen"aycabta2020-08-191-5/+5
|
* test/irb/test_history.rb: prevent warningsYusuke Endoh2020-08-181-4/+4
| | | | | | | | | | | | | ``` /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 ```
* Lounch external process on Windows correctlyaycabta2020-08-181-2/+1
|
* [ruby/irb] Change the way the IRB is invoked as an external processaycabta2020-08-181-2/+1
| | | | https://github.com/ruby/irb/commit/f4bcdf4375
* [ruby/reline] Keep original characters in inputrcaycabta2020-08-182-0/+95
| | | | https://github.com/ruby/reline/commit/96583c6336
* [ruby/reline] Support mode iconMark Delk2020-08-181-0/+34
| | | | | | Co-authored-by: aycabta <aycabta@gmail.com> https://github.com/ruby/reline/commit/067b618123
* [ruby/reline] Call #start_terminal after generating temporary inputrcaycabta2020-08-181-6/+28
| | | | | | because inputrc will be read when starting up https://github.com/ruby/reline/commit/0a30464385
* [ruby/reline] Use single quotes for non-expanded string literalsaycabta2020-08-181-4/+15
| | | | https://github.com/ruby/reline/commit/3bf7c7d722
* [ruby/reline] Use temporary dir with yamatanooroti testaycabta2020-08-181-2/+17
| | | | https://github.com/ruby/reline/commit/8d7df88e98
* [ruby/irb] Support shortening lambda notetion for nesting level of promptaycabta2020-08-181-5/+15
| | | | https://github.com/ruby/irb/commit/f1a775af47
* [ruby/irb] Support shortening lambda notationaycabta2020-08-181-0/+16
| | | | https://github.com/ruby/irb/commit/8e3f81d428
* [ruby/irb] Add require 'irb' to test separatelyaycabta2020-08-181-0/+1
| | | | https://github.com/ruby/irb/commit/9e4423b6e1
* [ruby/irb] Make history infinite if set SAVE_HISTORY to negativeaycabta2020-08-181-0/+23
| | | | https://github.com/ruby/irb/commit/824473e880
* [ruby/irb] Suppress crash when bignum is set to SAVE_HISTORYaycabta2020-08-181-0/+23
| | | | https://github.com/ruby/irb/commit/5044eb2730
* [ruby/irb] Add tests about IRB historyaycabta2020-08-181-0/+131
| | | | https://github.com/ruby/irb/commit/82efd370eb
* [ruby/irb] Support oneline method definitionaycabta2020-08-181-0/+29
| | | | https://github.com/ruby/irb/commit/826ae909c9
* test/fiber/test_backtrace.rb: prevent a warningYusuke Endoh2020-08-181-2/+2
| | | | | | | | | | | ``` /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 ```
* Disable debugging test.Koichi Sasada2020-08-181-1/+1
| | | | | | | | | | | ``` 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.
* Fix method name escaping in ObjectSpace.dumpJohn Hawthorn2020-08-171-0/+18
| | | | | | | | 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.
* Ensure the shortcut cached in the classNobuyoshi Nakada2020-08-171-0/+11
| | | | | | 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.
* Also escape DEL codeNobuyoshi Nakada2020-08-171-0/+1
|
* Fixed the radix for control charsNobuyoshi Nakada2020-08-171-0/+4
|
* Expose ec -> backtrace (internal) and use it to implement fiber backtrace.Samuel Williams2020-08-181-0/+22
| | | | See <https://bugs.ruby-lang.org/issues/16815> for more details.
* Remove the deprecated override of Kernel#open in open-uriJeremy Evans2020-08-161-12/+0
| | | | This was deprecated in 2.7 to resolve [Misc #15893].
* rb_str_{index,rindex}_m: Handle /\K/ in patternKasumi Hanazuki2020-08-131-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | 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]
* rb_str_{partition,rpartition}_m: Handle /\K/ in patternKasumi Hanazuki2020-08-131-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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]
* Fix corruption in ARGF.inplacePeter Zhu2020-08-121-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* string.c(rb_str_split_m): Handle /\K/ correctlyKasumi Hanazuki2020-08-121-0/+5
| | | | | | | 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]
* Test out fix for OpenSSL test flakinessAlan Wu2020-08-111-1/+1
| | | | | | | | | | | | | | | | | | `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/?
* Enable s390x invokebuiltin JIT test againTakashi Kokubun2020-08-111-1/+0
|
* Add more debug info to test_verifyKazuhiro NISHIYAMA2020-08-071-1/+1
| | | | http://ci.rvm.jp/results/trunk-random1@phosphorus-docker/3111684
* Add verbose message to random failed assertionKazuhiro NISHIYAMA2020-08-061-1/+1
| | | | | | for example: http://ci.rvm.jp/results/trunk-random1@phosphorus-docker/3111251 http://ci.rvm.jp/results/trunk-random1@phosphorus-docker/3109195
* [Feature #16513] TracePoint#inspect returns "... file:line" (#3391)Nguyễn Quang Minh2020-08-061-2/+2
| | | | | | | | | * 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
* Apply timeout-scale to test_thr_kill.Jun Aruga2020-08-061-1/+1
|
* [ruby/net-http] Fix SSL session reuse test with LibreSSL 3.2+Jeremy Evans2020-08-031-0/+8
| | | | https://github.com/ruby/net-http/commit/5ae9620fbc
* [ruby/net-http] Switch invalid server name formatJeremy Evans2020-08-031-5/+5
| | | | | | | | | | | | | | | | 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
* [rubygems/rubygems] Enable `Layout/LeadingEmptyLines` in rubygemsDavid Rodríguez2020-07-311-1/+0
| | | | https://github.com/rubygems/rubygems/commit/9c17f220af
* [rubygems/rubygems] Fix some intermittent test failures on trufflerubyDavid Rodríguez2020-07-311-0/+2
| | | | | | | | | | | | | | | 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
* [rubygems/rubygems] Setup no longer generates formatted executables by defaultDavid Rodríguez2020-07-311-6/+4
| | | | | | Catch up with that change in `gem update --system` tests. https://github.com/rubygems/rubygems/commit/127ba14344
* [rubygems/rubygems] Let more exceptions flowDavid Rodríguez2020-07-311-3/+14
| | | | | | | | | | | | | | | | If any error happens while verifying a package entry, it doesn't mean that the package is corrupt. It could be a bug in rubygems, for example. This in fact happened in CI and the current error doesn't make it easy to troubleshoot the root cause, since it doesn't provide a backtrace. See https://github.com/rubygems/rubygems/pull/3807/checks?check_run_id=862526615. So I propose to let the exception happens. There was something useful about the previous message, which is the file entry where the error happened, so I'm keeping that information in a warning message. https://github.com/rubygems/rubygems/commit/ece87d858f
* [rubygems/rubygems] Install plugins to user directoryNobuyoshi Nakada2020-07-311-0/+22
| | | | | | | | Fixes the `Gem::FilePermissionError` without the privilege. Initialize `@plugins_dir` to the user gem directory, when installing with `--user` option. https://github.com/rubygems/rubygems/commit/21a71ac769
* [rubygems/rubygems] Fix skip messageDavid Rodríguez2020-07-311-1/+1
| | | | https://github.com/rubygems/rubygems/commit/a763e539cd
* [rubygems/rubygems] Make sure tests at least load without opensslDavid Rodríguez2020-07-313-1/+12
| | | | https://github.com/rubygems/rubygems/commit/054d57f74b
* [rubygems/rubygems] Set the expected hash in one stepDavid Rodríguez2020-07-311-5/+4
| | | | https://github.com/rubygems/rubygems/commit/25912ce6c9
* [rubygems/rubygems] Remove unnecessary checkDavid Rodríguez2020-07-311-6/+4
| | | | | | | No check is done for the other expectation and they are completely symmetric as far as I can see. https://github.com/rubygems/rubygems/commit/4de89e0718
* [rubygems/rubygems] https functionality was merged into `net/https`David Rodríguez2020-07-311-1/+1
| | | | https://github.com/rubygems/rubygems/commit/d81ce9e457