summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2019-08-25Inspect dynamic symbol as well as static symbolNobuyoshi Nakada
2019-08-21Add abs to Matrix (#2199)Fernando Wolf Bona
2019-08-20Enable more Time TZ tests on OpenBSDJeremy Evans
2019-08-19Make portable for standalone test-unit gem.Hiroshi SHIBATA
* It can invoke test-unit with envutil.rb * refute_match of test-unit couldn't handle String instance.
2019-08-18Remove commented out debug printaycabta
2019-08-18Don't crash when deleting at the end of the lineAlan Wu
To reproduce this bug, type one character into irb, then press the delete key on your keyboard.
2019-08-17Remove Travis CI workaroundaycabta
2019-08-17Removed test_case files from lib directory.Hiroshi SHIBATA
2019-08-17Skip teardown with JRubyHiroshi SHIBATA
2019-08-17Use the original require for test_race_exceptionHiroshi SHIBATA
The extension for require method with rubygems affects this test case. We need to keep this test for the original method.
2019-08-17Revert "Revert "[rubygems/rubygems] [Require] Ensure -I beats a default gem""Hiroshi SHIBATA
This reverts commit 75d29db8f965893bb6ab38b9008abc80cdda246e.
2019-08-17Search refinement module along nested usingsNobuyoshi Nakada
[Bug #16107] Notes: Merged: https://github.com/ruby/ruby/pull/2373
2019-08-17Revert "[rubygems/rubygems] [Require] Ensure -I beats a default gem"Hiroshi SHIBATA
This reverts commit 00cd5d74cecb6aa4a184e57e2b8246ef6e45d458.
2019-08-17Move lib directory to the last of $LOAD_PATH on ruby repository.Hiroshi SHIBATA
https://github.com/rubygems/rubygems/pull/1868 changes the behavior of require when it used with -I options. Therefore, the options of ruby repository was different from rubygems/rubygems.
2019-08-17[rubygems/rubygems] Do not mutate uri.query during s3 signature creationAlexander Pakulov
https://github.com/rubygems/rubygems/commit/c0275ee537
2019-08-17[rubygems/rubygems] Autoswitch to exact bundler version if presentDavid Rodríguez
https://github.com/rubygems/rubygems/commit/bb02953a97
2019-08-17[rubygems/rubygems] Fix removing unresolved default spec files from mapDavid Rodríguez
https://github.com/rubygems/rubygems/commit/7964917bbc
2019-08-17[rubygems/rubygems] Replace domain parameter in ↵bronzdoc
Gem::Command#show_lookup_failure with a parameter to suppress suggestions https://github.com/rubygems/rubygems/commit/760b7d834f
2019-08-17[rubygems/rubygems] [Require] Ensure -I beats a default gemSamuel Giddins
https://github.com/rubygems/rubygems/commit/6fbda98eb3
2019-08-17[rubygems/rubygems] Make test also assert the gems that it should loadDavid Rodríguez
https://github.com/rubygems/rubygems/commit/a6375920bf
2019-08-17[rubygems/rubygems] Use `assert_require`David Rodríguez
For consistency with the other specs. https://github.com/rubygems/rubygems/commit/44b93aec4c
2019-08-16[ruby/rdoc] Use assert_raiseNobuyoshi Nakada
https://github.com/ruby/rdoc/commit/f2c63549f7
2019-08-16Set IRB::Context#return_format on test clarifyaycabta
2019-08-16Use assert_raise and skip for test/unitaycabta
2019-08-16RDoc::Parser::C: Integrate do_classes and do_modules by one regexp matchYusuke Endoh
The full scan of the C source code (`@content.scan`) is very slow. The old code invokes the scan six times in `do_classes` and `do_modules`. This change integrates the six scans into one by merging the regexps. The integrated regexp is a bit hard to maintain, but the speed up is significant: approx. 30 sec -> 20 sec in Ruby's `make rdoc`. In addition, this change omits `do_boot_defclass` unless the file name is `class.c`. `boot_defclass` is too specific to Ruby's source code, so RDoc should handle it as a special case. Before this change: TOTAL (pct) SAMPLES (pct) FRAME 858 (13.6%) 858 (13.6%) (garbage collection) 292 (4.6%) 264 (4.2%) RDoc::Parser::C#do_define_class 263 (4.2%) 250 (3.9%) RDoc::Parser::C#do_define_module 275 (4.3%) 241 (3.8%) RDoc::Parser::C#do_define_class_under 248 (3.9%) 237 (3.7%) RDoc::Parser::C#do_define_module_under 234 (3.7%) 234 (3.7%) RDoc::Parser::C#gen_body_table 219 (3.5%) 219 (3.5%) Ripper::Lexer#state_obj 217 (3.4%) 216 (3.4%) RDoc::Parser::C#do_struct_define_without_accessor 205 (3.2%) 205 (3.2%) RDoc::Parser::C#do_boot_defclass 205 (3.2%) 205 (3.2%) RDoc::Parser::C#do_singleton_class The six methods take approx. 22.2%. `do_define_class` (4.2%) + `do_define_class_under` (3.8%) + `do_define_module` (3,9$) + `do_define_module_under` (3.7%) + `do_struct_define_without_accessor` (3.4%) + `do_singleton_class` (3.2%) After this change, the methods are integrated to `do_classes_and_modules` which takes only 5.8%. TOTAL (pct) SAMPLES (pct) FRAME 812 (16.7%) 812 (16.7%) (garbage collection) 355 (7.3%) 284 (5.8%) RDoc::Parser::C#do_classes_and_modules 225 (4.6%) 225 (4.6%) RDoc::Parser::C#gen_body_table 429 (8.8%) 210 (4.3%) RDoc::Parser::RubyTools#get_tk 208 (4.3%) 208 (4.3%) RDoc::TokenStream#add_tokens
2019-08-16Parser was replacedaycabta
2019-08-16Gem::TestCase is based on MinitestHiroshi SHIBATA
2019-08-16Use omit instead of skip for test-unit.Hiroshi SHIBATA
2019-08-16Use test/unit instead of test-unit. Because test-unit is only provided ↵Hiroshi SHIBATA
standalone gem.
2019-08-16Cleanup commented-out code.Hiroshi SHIBATA
2019-08-16Removed needless alias for capture_io.Hiroshi SHIBATA
2019-08-16Fallback for older RubygemsNobuyoshi Nakada
2019-08-16Use Gem.default_specifications_dirNobuyoshi Nakada
Gem::Specification.default_specifications_dir is deprecated.
2019-08-16Renamed minitest_helper.rb as helper.rbNobuyoshi Nakada
2019-08-16Use locale directory for the testsNobuyoshi Nakada
2019-08-16Use test-unit instead of minitestNobuyoshi Nakada
Minitest 6 will err `assert_equal` with `nil`. https://github.com/seattlerb/minitest/issues/779
2019-08-16Treat linking to Markdown label correctlyaycabta
2019-08-16Separate RDoc::TokenStream#add_tokens and #add_tokenYusuke Endoh
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.
2019-08-16Refactor and improve performance of RDoc::Markup::ParserYusuke Endoh
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.
2019-08-16Don't echo results of assignment expressionsSteven Willis
2019-08-16Adding missing test for Net::HTTPGenericRequest initializer (#1835)Espartaco Palma
A new exception is raised if an URI::HTTP is received and that object doesn't have a hostname property. Complementary to #1278
2019-08-15Fixed heap-use-after-freeNobuyoshi Nakada
* 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]
2019-08-14Make Range#=== operate like cover? instead of include? for string rangesJeremy Evans
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]
2019-08-14Implement Range#minmaxJeremy Evans
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]
2019-08-14Remove support for nil::ConstantJeremy Evans
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]
2019-08-14Don't accidentally name anonymous module/classAlan Wu
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] Notes: Merged: https://github.com/ruby/ruby/pull/2337
2019-08-14change Proc#to_s format ('@...' -> ' ...') (#2362)Koichi Sasada
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]
2019-08-14[ruby/stringio] Supported BOMNobuyoshi Nakada
https://github.com/ruby/stringio/commit/b249631c43
2019-08-14[ruby/stringio] stringio: encoding supportNobuyoshi Nakada
https://github.com/ruby/stringio/commit/7b20075ab0
2019-08-13UTF LE is fixed at least the first 2 bytesNobuyoshi Nakada
* io.c (io_strip_bom): if the first 2 bytes are 0xFF0xFE, it should be a little-endian UTF, 16 or 32. [Bug #16099]