summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2020-09-28[Fixes #137] Improve reportingMarc-Andre Lafortune
2020-09-28[rubygems/rubygems] Add writable check for cache dirxndcn
Sometimes "install_dir/cache" directory is not writable although "install_dir" is writable. https://github.com/rubygems/rubygems/commit/665221cb69 Notes: Merged: https://github.com/ruby/ruby/pull/3599
2020-09-28[rubygems/rubygems] Add test for "gem update --system --silent"Ellen Marie Dash
https://github.com/rubygems/rubygems/commit/c3fb0db930 Notes: Merged: https://github.com/ruby/ruby/pull/3599
2020-09-28Disallow downgrades to too old versionsDavid Rodríguez
Consider the version original included with each ruby as the minimum supported version. Notes: Merged: https://github.com/ruby/ruby/pull/3599
2020-09-28[rubygems/rubygems] Deprecate --dryrunbronzdoc
https://github.com/rubygems/rubygems/commit/1715610648 Notes: Merged: https://github.com/ruby/ruby/pull/3599
2020-09-28[rubygems/rubygems] Make --dry-run flag consistent across rubygems commandsbronzdoc
https://github.com/rubygems/rubygems/commit/addc644cad Notes: Merged: https://github.com/ruby/ruby/pull/3599
2020-09-28Added `--platform` option to `build` commandNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/3599
2020-09-27Revert the first diff of "Use Tempfile.create instead of Tempfile.open in ↵Benoit Daloze
test_io.rb" * This partially reverts commit dead7478748a828c45e16134fca812bc7771344e. * Windows will not allow a file to be unlinked if any file handles exist, see https://github.com/ruby/ruby/pull/3597
2020-09-26Use Tempfile.create instead of Tempfile.open in test_io.rbBenoit Daloze
2020-09-25Return nil when argument to ObjectSpace.internal_class_of is T_IMEMOAlan Wu
The added test case crashes the interpreter because it makes ObjectSpace.internal_class_of return the second VALUE slot of an AST imemo object. The second VALUE slot of `struct rb_ast_struct` is not a VALUE and not a pointer to a Ruby object. Notes: Merged: https://github.com/ruby/ruby/pull/3503
2020-09-26test/net/smtp/test_smtp.rb: Stop io leaksYusuke Endoh
`make test-all` was very noisy by warnings like ``` Leaked file descriptor: Net::TestSMTP#test_start_with_position_argument: 6 : #<TCPSocket:fd 6, AF_INET, 127.0.0.1, 43770> ```
2020-09-25test/ruby/test_enumerator.rb: check the deprecation warningYusuke Endoh
by explicitly setting `Warning[:deprecated] = true`. I removed "capture_io" at 79063d8cbfb7ce4740774289252a2a20dc9a5dc1, but it printed the warning when `RUBYOPT=-w`. This change makes the warnings enabled explicitly, capture and check the warning.
2020-09-25test/ruby/test_memory_view.rb: prevent "assigned but unused variable - members"Yusuke Endoh
2020-09-25test/ruby/test_enumerator.rb: remove capture_io that is no longer neededYusuke Endoh
The deprecation warning was disabled, and the code to check the warning was removed at 996af2ce086249e904b2ce95ab2fcd1de7d757be, thus capture_io is no longer needed.
2020-09-25t/json/json_common_interface_test.rb: fix wrong indentationYusuke Endoh
to prevent: ``` test/json/json_common_interface_test.rb:182: warning: mismatched indentations at 'end' with 'def' at 169 ```
2020-09-25freeze all Range objects.v3_0_0_preview1Koichi Sasada
Matz want to try to freeze all Range objects. [Feature #15504] Notes: Merged: https://github.com/ruby/ruby/pull/3583
2020-09-25Buffer protocol proposal (#3261)Kenta Murata
* Add buffer protocol * Modify for some review comments * Per-object buffer availability * Rename to MemoryView from Buffer and make compilable * Support integral repeat count in memory view format * Support 'x' for padding bytes * Add rb_memory_view_parse_item_format * Check type in rb_memory_view_register * Update dependencies in common.mk * Add test of MemoryView * Add test of rb_memory_view_init_as_byte_array * Add native size format test * Add MemoryView test utilities * Add test of rb_memory_view_fill_contiguous_strides * Skip spaces in format string * Support endianness specifiers * Update documentation * Support alignment * Use RUBY_ALIGNOF * Fix format parser to follow the pack format * Support the _ modifier * Parse count specifiers in get_format_size function. * Use STRUCT_ALIGNOF * Fix test * Fix test * Fix total size for the case with tail padding * Fix rb_memory_view_get_item_pointer * Fix rb_memory_view_parse_item_format again Notes: Merged-By: mrkn <mrkn@ruby-lang.org>
2020-09-25Extract assert assertion to assert_include and assert_not_include.Hiroshi SHIBATA
2020-09-25assert_true is not provided by test-unitHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/3581
2020-09-25Fix pure parser with unclosed arrays / objects [Fix #314]Marc-Andre Lafortune
Notes: Merged: https://github.com/ruby/ruby/pull/3581
2020-09-25[test] properly 'skip' test on JRubyKarol Bucek
an early return still caused ensure to execute, setting JSON constant to `nil` for later tests! Notes: Merged: https://github.com/ruby/ruby/pull/3581
2020-09-25[flori/json] Add `load_file` and `load_file!` methods, with tests. Fixes ↵Keith Bennett
issue #386. https://github.com/flori/json/commit/0be363c99b Notes: Merged: https://github.com/ruby/ruby/pull/3581
2020-09-25Add an option to escape forward slash characterJean Boussier
Squashed commit of the following: commit 26d181059989279a79c433cedcd893b4f52e42ee Author: Francois Chagnon <francois.chagnon@jadedpixel.com> Date: Tue Sep 15 21:17:34 2015 +0000 add config options for escape_slash commit fa282334051b16df91ca097dd7304b46f3bc7719 Author: Francois Chagnon <francois.chagnon@jadedpixel.com> Date: Mon Feb 9 21:09:33 2015 +0000 add forward slash to escape character Notes: Merged: https://github.com/ruby/ruby/pull/3581
2020-09-25Add resolve_timeout to TCPSocket [Feature #17134]Masaki Matsushita
2020-09-25[ruby/psych] Forward keyword arguments in load_file and load_streamJean Boussier
https://github.com/ruby/psych/commit/4e1dd37f09
2020-09-25Remove private_iv_getCharles Oliver Nutter
The only remaining use of this function was to get the internal message object from an exception's hidden `mesg` instance variable to allow it to be dumped wiithout converting to a string. As discussed in #103, this exposes internal implementation details of CRuby, and ultimately does not provide any real utility to the user since they can't directly inspect this hidden variable. The test change here is to reflect CRuby behavior that denies equality if the internal message objects do not match, as is the case after the exception has been loaded and now has a simple String value. The impact to users is that exceptions with special hidden message objects will convert those objects to String during marshaling through YAML. I believe this only affects NameError and its descendants, since users can't set this field directly on their own exception types. Fixes #103.
2020-09-25Disable deprecation warning by the default [Feature #16345]Nobuyoshi Nakada
And `-w` option turns it on. Notes: Merged: https://github.com/ruby/ruby/pull/3481
2020-09-25Revert "[ruby/webrick] Add test for shutdown_pipe"Hiroshi SHIBATA
This reverts commit c06eab13290757fc326bb2a6e3ac25cd53e00894.
2020-09-25Revert "[ruby/webrick] Fix shutdown_pipe test issue"Hiroshi SHIBATA
This reverts commit b8fdd38b2e01abcfd4cc8d007a3b3afb285f5ddb.
2020-09-24Revert "[ruby/webrick] Allow empty POST and PUT requests without content length"Hiroshi SHIBATA
This reverts commit ed12019ce6abe87aac87ec77ac081d37b25180a2. https://github.com/ruby/ruby/runs/1160423667?check_suite_focus=true#step:14:752
2020-09-24[ruby/webrick] Manually pick commit from upstream repoHiroshi SHIBATA
Fix test when run with US-ASCII encoding https://github.com/ruby/webrick/commit/f402aafb36bbd43be54621405da550643a1a1a4c
2020-09-24[ruby/webrick] Only run test_big_bodies test on Ruby 2.5+Jeremy Evans
It was added after Ruby 2.5, and it looks like it never ran correctly on Ruby <2.5. https://github.com/ruby/webrick/commit/65fb03cb6a
2020-09-24[ruby/webrick] Allow empty POST and PUT requests without content lengthJeremy Evans
RFC 7230 section 3.3.3 allows for this. Fixes #30 https://github.com/ruby/webrick/commit/069e9b1908
2020-09-24[ruby/webrick] Allow EPROTOTYPE error when writing junk to a socketJeremy Evans
MacOS seems to raise this error in some cases. https://github.com/ruby/webrick/commit/0f0c9f1e61
2020-09-24[ruby/webrick] Fix shutdown_pipe test issueJohn W Higgins
https://github.com/ruby/webrick/commit/9676704c60
2020-09-24[ruby/webrick] Ensure server port numbers are numeric and ensure they are ↵John W Higgins
stored as integers https://github.com/ruby/webrick/commit/86ed621e11
2020-09-24[ruby/webrick] Add test for shutdown_pipeJohn W Higgins
https://github.com/ruby/webrick/commit/1daacc1849
2020-09-24[ruby/webrick] Do not use ensure in a block without beginJeremy Evans
This syntax is not supported until Ruby 2.5, and Webrick still targets Ruby 2.3+. https://github.com/ruby/webrick/commit/fbe85b885f
2020-09-24[ruby/webrick] Skip env-locale-sensitive CGI test on the "java" platformCharles Oliver Nutter
JRuby's environment variables are provided by the Java Development Kit's (JDK's) classes, which present them as a map from string to string. In order to do this, those environment variable names and values must be decoded into characters, which breaks any variables that are intended to be "raw" bytes not necessarily decodable with the default system encoding. This issue is detailed in jruby/jruby#6248. The only solution on the JRuby side will be to bypass the JDK environment variable API and go directly to the native getenv/setenv system calls. This is not likely to happen in the near future, due to the complexity of such a change and the rarity of undecodable environment values. The exclude here was added due to the Windows platform also having a similar sensitivity to character encodings when working with environment variables. It seems appropriate to expand this skip to the "java" platform, as the root issue is largely the same. https://github.com/ruby/webrick/commit/dc453e5c3c
2020-09-24test/net/http/test_https.rb: The test logic was buggyYusuke Endoh
The expected certs must be `[CA_CERT, SERVER_CERT]` before 1.1.1g and `[SERVER_CERT]` after 1.1.1h.
2020-09-24test/net/http/test_https.rb: the order of verify_callback seems to varyYusuke Endoh
... depending upon the environment.
2020-09-24test/ostruct/test_ostruct.rb: Prevent "method redefined; discarding old foo"Yusuke Endoh
2020-09-24test/fiber/scheduler.rb: Prevent "instance variable @urgent not initialized"Yusuke Endoh
2020-09-24test/net/http/test_https.rb: Stop the error due to openssl 1.1.1hYusuke Endoh
On some environments that uses OpenSSL 1.1.1h, the two tests now fail. http://rubyci.s3.amazonaws.com/android29-x86_64/ruby-master/log/20200924T062352Z.fail.html.gz https://github.com/ruby/ruby/runs/1159288773?check_suite_focus=true ``` 1) Failure: TestNetHTTPS#test_get [/data/data/com.termux/files/home/cb/tmp/build/20200924T062352Z/ruby/test/net/http/test_https.rb:47]: <"0\x82\x03\xED0\x82\x02\xD5\xA0\x03..."> expected but was <"0\x82\x03\xE30\x82\x02\xCB\xA0\x03...">. ``` Not sure why, but verify_callback now seems to receive only SERVER_CERT but not CA_CERT. It would be good to investigate the issue furthermore, but tentatively, I want to stop the failures.
2020-09-23Revert "Manually merged from https://github.com/rubygems/rubygems/pull/2636"Hiroshi SHIBATA
31a6eaabc165d8a222e176f2c809d90622d88ec2 is obsoleted with https://github.com/rubygems/rubygems/pull/3820
2020-09-23Manually merged from https://github.com/rubygems/rubygems/pull/2636Hiroshi SHIBATA
Enable Style/EmptyLinesAroundClassBody rubocop cop.
2020-09-23strip trailing spaces [ci skip]Nobuyoshi Nakada
2020-09-22Update UnixSocket#recv_io tests to handle receiving a UnixSocketJeremy Evans
Receiving UnixSocket works fine if you don't provide a mode, and I think it is reasonable to expect that you should not provide a mode if klass.for_fd would not accept a mode. Fixes [Bug #11778] Notes: Merged: https://github.com/ruby/ruby/pull/3566
2020-09-22Revert "Prevent SystemStackError when calling super in module with activated ↵Jeremy Evans
refinement" This reverts commit eeef16e190cdabc2ba474622720f8e3df7bac43b. This also reverts the spec change. Preventing the SystemStackError would be nice, but there is valid code that the fix breaks, and it is probably more common than cases that cause the SystemStackError. Fixes [Bug #17182] Notes: Merged: https://github.com/ruby/ruby/pull/3564
2020-09-21Make hash returned by Hash#transform_values not have a defaultJeremy Evans
This sets an explicit default of nil. There is probably a better approach of removing the default. Fixes [Bug #17181] Notes: Merged: https://github.com/ruby/ruby/pull/3563