aboutsummaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
...
* Treat linking to Markdown label correctlyaycabta2019-08-163-1/+11
|
* Separate RDoc::TokenStream#add_tokens and #add_tokenYusuke Endoh2019-08-161-2/+2
| | | | | | | | | | | | | | | The old version of `add_tokens` accepts an array of tokens, and multiple arguments of tokens by using `Array#flatten`. And `add_token` was an alias to `add_tokens`. I think it is unnecessarily flexible; in fact, all callsites of `add_tokens` (except test) passes only an array of tokens. And the code created a lot of temporal arrays. This change makes `add_tokens` accept only one array of tokens, and does `add_token` accept one token. It is a bit faster (about 1 second in Ruby's `make rdoc`), and it ls also cleaner in my point of view.
* Refactor and improve performance of RDoc::Markup::ParserYusuke Endoh2019-08-161-18/+0
| | | | | | | | | | | | | | | | This change introduces a wrapper of StringScanner that is aware of the current position (column and lineno). It has two advantages: faster and more modular. The old code frequently runs `@input.byteslice(0, byte_offset).length` to get the current position, but it was painfully slow. This change keeps track of the position at each scan, which reduces about half of time of "Generating RI format into ..." in Ruby's `make rdoc` (5.5 sec -> 3.0 sec). And the old code used four instance variables (`@input`, `@line`, `@line_pos`, and `@s`) to track the position. This change factors them out into MyStringScanner, so now only one variable (`@s`) is needed.
* Don't echo results of assignment expressionsSteven Willis2019-08-162-0/+126
|
* Adding missing test for Net::HTTPGenericRequest initializer (#1835)Espartaco Palma2019-08-161-0/+1
| | | | | A new exception is raised if an URI::HTTP is received and that object doesn't have a hostname property. Complementary to #1278
* Fixed heap-use-after-freeNobuyoshi Nakada2019-08-151-0/+6
| | | | | | * string.c (rb_str_sub_bang): retrieves a pointer to the replacement string buffer just before using it, for the case of replacement with the receiver string itself. [Bug #16105]
* Make Range#=== operate like cover? instead of include? for string rangesJeremy Evans2019-08-141-0/+8
| | | | | | | | | | | | | | | | | | Previously, Range#=== treated string ranges that were not endless or beginless the same as include?, instead of the same as cover?. I think this was an oversight in 989e07c0f2fa664a54e52a475c2fcc145f06539d, as the commit message did not indicate this behavior was desired. This also makes some previously dead code no longer dead. Previously, the conditionals were doing this: if (RB_TYPE_P(beg, T_STRING) if (NIL_P(beg)) # can never be true This restructures it so at the NIL_P(beg) check, beg could possibly be nil (beginless ranges). Fixes [Bug #15449]
* Implement Range#minmaxJeremy Evans2019-08-141-0/+21
| | | | | | | | | Range#minmax was previous not implemented, so calling #minmax on range was actually calling Enumerable#minmax. This is a simple implementation of #minmax by just calling range_min and range_max. Fixes [Bug #15867] Fixes [Bug #15807]
* Remove support for nil::ConstantJeremy Evans2019-08-141-0/+6
| | | | | | | | | | This was an intentional bug added in 1.9. The approach taken here is to add a second operand to the getconstant instruction for whether nil should be allowed and treated as current scope. Fixes [Bug #11718]
* Don't accidentally name anonymous module/classAlan Wu2019-08-141-0/+18
| | | | | | | | | | | | | | | | | | b00f280d4b9569e7153365d7e1c522b3d6b3c6cf introduced an accidental behavior change in that defining a module/class under `m` gives `m` a name when `m` is anonymous. `ruby -ve 'Module.new { class self::A; end; p name }'` outputs a name similar to `Module#inspect` when it should output `nil` like in Ruby 2.6.x. * variable.c: Use `make_temporary_path` instead of `save_temporary_path` when getting the name of the parent module. * variable.c (rb_set_class_path): Delegate to `rb_set_class_path_string` instead of duplicating the logic. [Bug #16097]
* change Proc#to_s format ('@...' -> ' ...') (#2362)Koichi Sasada2019-08-141-2/+2
| | | | | | | | Now Proc#to_s returns "#<Proc:0x00000237a0f5f170@t.rb:1>". However, it is convenient to select a file name by (double-)clicking on some terminals by separating ' ' instead of '@' like "#<Proc:0x00000237a0f5f170 t.rb:1>" [Feature #16101]
* [ruby/stringio] Supported BOMNobuyoshi Nakada2019-08-141-0/+14
| | | | https://github.com/ruby/stringio/commit/b249631c43
* [ruby/stringio] stringio: encoding supportNobuyoshi Nakada2019-08-141-1/+11
| | | | https://github.com/ruby/stringio/commit/7b20075ab0
* UTF LE is fixed at least the first 2 bytesNobuyoshi Nakada2019-08-132-3/+3
| | | | | * io.c (io_strip_bom): if the first 2 bytes are 0xFF0xFE, it should be a little-endian UTF, 16 or 32. [Bug #16099]
* date_parse.c: avoid copyingNobuyoshi Nakada2019-08-121-1/+2
| | | | | * ext/date/date_parse.c (date_zone_to_diff): get rid of copying the whole argument string.
* Add another test for frame omitted inliningTakashi Kokubun2019-08-121-0/+16
|
* Use capture_output instead of capture_io.Hiroshi SHIBATA2019-08-1113-87/+87
| | | | It's preparation for migrating test-unit on upstream.
* Adjust indent [ci skip]Nobuyoshi Nakada2019-08-111-1/+1
|
* Warn instance variable `E`Nobuyoshi Nakada2019-08-101-2/+6
| | | | It is not dumped, as it is a short alias for `:encoding`.
* Fix parsing of mutiple assignment with rescue modifierJeremy Evans2019-08-091-0/+5
| | | | | | | | | | | | | | | | | | | Single assignment with rescue modifier applies rescue to the RHS: a = raise rescue 1 # a = (raise rescue 1) Previously, multiple assignment with rescue modifier applied rescue to the entire expression: a, b = raise rescue [1, 2] # (a, b = raise) rescue [1, 2] This makes multiple assignment with rescue modifier consistent with single assignment with rescue modifier, applying rescue to the RHS: a, b = raise rescue [1, 2] # a, b = (raise rescue [1, 2]) Implements [Feature #8239] Fixes [Bug #8279]
* restore timeoutKoichi Sasada2019-08-091-3/+1
|
* extend timeout to debug.Koichi Sasada2019-08-091-1/+3
|
* double memory limit on MJIT.Koichi Sasada2019-08-091-1/+2
| | | | | On test with MJIT, sometimes it fails like: http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/2189967
* introduce RCLASS_CLONED flag for inline cache.Koichi Sasada2019-08-092-9/+46
| | | | | | | | | Methods on duplicated class/module refer same constant inline cache (IC). Constant access lookup should be done for cloned class/modules but inline cache doesn't check it. To check it, this patch introduce new RCLASS_CLONED flag which are set when if class/module is cloned (both orig and dst). [Bug #15877]
* Iseq#to_binary: Add support for NoMatchingPatternError and TypeErrorAlan Wu2019-08-091-0/+10
| | | | | | | | | | Binary dumping the iseq for `case foo in []; end` used to crash as there was no handling for these exception classes. Pattern matching generates these classes as operands to `putobject`. [Bug #16088] Closes: https://github.com/ruby/ruby/pull/2325
* Should require without wrapper moduleNobuyoshi Nakada2019-08-091-0/+13
|
* Reduce unnecessary EXEC_TAG in requireNobuyoshi Nakada2019-08-081-2/+2
|
* solve "duplicate :raise event" in require too [Bug #15877]Nobuyoshi Nakada2019-08-081-1/+7
|
* solve "duplicate :raise event" [Bug #15877]Koichi Sasada2019-08-081-0/+13
| | | | | | | Without this patch, "raise" event invoked twice when raise an exception in "load"ed script. This patch by danielwaterworth (Daniel Waterworth). [Bug #15877]
* Aliases capture_output to capture_io for test-unit compatiblity.Hiroshi SHIBATA2019-08-084-9/+5
|
* Fix Date#step testNobuyoshi Nakada2019-08-071-2/+4
| | | | The document states that "the limit should be a date object".
* Revert "Don't echo results of assignment expressions"aycabta2019-08-062-126/+0
| | | | This reverts commit 1ee88c51b3c319b74b69540e111e4a1c24833cad.
* Don't echo results of assignment expressionsSteven Willis2019-08-062-0/+126
|
* Removing duplicated assertions on test_array.rb - MINUS methodEspartaco Palma2019-08-061-4/+0
| | | | Closes: https://github.com/ruby/ruby/pull/1790
* Improve same directory detection in FileUtilsJustin Collins2019-08-061-0/+10
| | | | Closes: https://github.com/ruby/ruby/pull/1425
* Give up stabilizing TestProcess on Travis osxTakashi Kokubun2019-08-062-2/+9
| | | | | | | | | | They have been too unstable. Revert "Extend sleep before sending USR1 in TestProcess" This reverts commit aaf69a8ba866193863a7eafe5c6044844bd71bc3. Revert "Extend sleep before sending USR1 in TestProcess" This reverts commit 076f3fcf11a061394d3d5f8c671512df1e983023.
* [rubygems/rubygems] Use the standard RUBY_ENGINE_VERSION instead of ↵Benoit Daloze2019-08-052-31/+20
| | | | | | | | | JRUBY_VERSION * RUBY_ENGINE and RUBY_ENGINE_VERSION are defined on every modern Ruby. * There is no such constant as TRUFFLERUBY_VERSION or RBX_VERSION. https://github.com/rubygems/rubygems/commit/431d0aefdd
* [rubygems/rubygems] Fix error handling of #with_engine_versionBenoit Daloze2019-08-051-12/+13
| | | | | | | * If settings constants fail, show that exception instead of getting another one due to variables being unset and hiding the real cause. https://github.com/rubygems/rubygems/commit/f38cd67874
* [rubygems/rubygems] Cleanup after testing `rake package`David Rodríguez2019-08-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes it happens to me that my local tests start failing because I pull some file removals or renames into my local copy, and those are still present on my last copy of pkg/. In those cases, the test about `rake package` will fail with something like the following: ```` Failure: TestRakePackage#test_builds_ok [/home/deivid/Code/rubygems/test/rubygems/test_rake_package.rb:13]: Expected `rake package` to work, but got errors: ``` cd pkg/rubygems-update-3.1.0.pre1 WARNING: See http://guides.rubygems.org/specification-reference/ for help rake aborted! Gem::InvalidSpecificationException: ["test/rubygems/test_rake_package.rb"] are not files Tasks: TOP => package => gem => pkg/rubygems-update-3.1.0.pre1.gem (See full trace by running task with --trace) ``` If you have added or removed files, make sure you run `rake update_manifest` to update the `Manifest.txt` accordingly. Expected: true Actual: false ```` So, make sure, package is always built from scratch. https://github.com/rubygems/rubygems/commit/4e2cc9eb26
* [rubygems/rubygems] Revert cadb66037d9b58c80fc795f39384d533229a1f73bronzdoc2019-08-051-0/+18
| | | | https://github.com/rubygems/rubygems/commit/5c3158d975
* Expand the timeout of `test_pstore_files_are_accessed_as_binary_files`NAKAMURA Usaku2019-08-051-1/+1
| | | | Sometimes causes timeout error on mswin CI
* Check if signaledNobuyoshi Nakada2019-08-051-2/+4
|
* Refined assertion messagesNobuyoshi Nakada2019-08-051-11/+9
|
* Fixed assertionNobuyoshi Nakada2019-08-051-1/+1
| | | | The regexp should be expected to match the error message.
* Extend sleep before sending USR1 in TestProcessTakashi Kokubun2019-08-041-1/+1
| | | | | | | just like 076f3fcf11a061394d3d5f8c671512df1e983023. This test also hanged on Travis osx https://travis-ci.org/ruby/ruby/jobs/567547060
* Revert "Skip test_race_exception on MJIT for now"Takashi Kokubun2019-08-041-1/+0
| | | | | | | | | | | This reverts commit 7a75baa6e294473f02da512c99f7ef1f76b2d83c. Revert "Defer skip to avoid errors on ensure" This reverts commit adfc8d6dbadbccef27d6ec78022650840c7604cc. because 76e2370f132f83c16c9de39a0a9356579f364527 is hoped to fix the problem.
* [ruby/rexml] xpath: add missing value conversions for equality and ↵Kouhei Sutou2019-08-042-84/+256
| | | | | | | | | | relational expressions GitHub: fix #18 Reported by Mirko Budszuhn. Thanks!!! https://github.com/ruby/rexml/commit/0dca2a2ba0
* [ruby/rexml] xpath number: fix a bug that false is converted to NaNKouhei Sutou2019-08-041-25/+28
| | | | | | | | | | GitHub: fix #18 It must be 0. Reported by Mirko Budszuhn. Thanks!!! https://github.com/ruby/rexml/commit/b48f3afa3b
* [ruby/rexml] xpath local_name: fix a bug that nil is returned for ↵Kouhei Sutou2019-08-044-0/+45
| | | | | | | | nonexistent case It must be an empty string. https://github.com/ruby/rexml/commit/81bc7cd4f5
* [ruby/rexml] xpath boolean: implementKouhei Sutou2019-08-041-0/+75
| | | | https://github.com/ruby/rexml/commit/feb8ddb1ec