aboutsummaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* freeze all Range objects.v3_0_0_preview1Koichi Sasada2020-09-252-3/+3
| | | | | Matz want to try to freeze all Range objects. [Feature #15504]
* Buffer protocol proposal (#3261)Kenta Murata2020-09-251-0/+249
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Extract assert assertion to assert_include and assert_not_include.Hiroshi SHIBATA2020-09-251-1/+2
|
* assert_true is not provided by test-unitHiroshi SHIBATA2020-09-251-1/+1
|
* Fix pure parser with unclosed arrays / objects [Fix #314]Marc-Andre Lafortune2020-09-254-0/+4
|
* [test] properly 'skip' test on JRubyKarol Bucek2020-09-251-2/+1
| | | | | an early return still caused ensure to execute, setting JSON constant to `nil` for later tests!
* [flori/json] Add `load_file` and `load_file!` methods, with tests. Fixes ↵Keith Bennett2020-09-251-0/+56
| | | | | | issue #386. https://github.com/flori/json/commit/0be363c99b
* Add an option to escape forward slash characterJean Boussier2020-09-252-0/+11
| | | | | | | | | | | | | | | | 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
* Add resolve_timeout to TCPSocket [Feature #17134]Masaki Matsushita2020-09-251-0/+14
|
* [ruby/psych] Forward keyword arguments in load_file and load_streamJean Boussier2020-09-251-0/+34
| | | | https://github.com/ruby/psych/commit/4e1dd37f09
* Remove private_iv_getCharles Oliver Nutter2020-09-251-1/+2
| | | | | | | | | | | | | | | | | | | | | 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.
* Disable deprecation warning by the default [Feature #16345]Nobuyoshi Nakada2020-09-258-120/+31
| | | | And `-w` option turns it on.
* Revert "[ruby/webrick] Add test for shutdown_pipe"Hiroshi SHIBATA2020-09-251-12/+0
| | | | This reverts commit c06eab13290757fc326bb2a6e3ac25cd53e00894.
* Revert "[ruby/webrick] Fix shutdown_pipe test issue"Hiroshi SHIBATA2020-09-251-20/+9
| | | | This reverts commit b8fdd38b2e01abcfd4cc8d007a3b3afb285f5ddb.
* Revert "[ruby/webrick] Allow empty POST and PUT requests without content length"Hiroshi SHIBATA2020-09-241-12/+0
| | | | | | This reverts commit ed12019ce6abe87aac87ec77ac081d37b25180a2. https://github.com/ruby/ruby/runs/1160423667?check_suite_focus=true#step:14:752
* [ruby/webrick] Manually pick commit from upstream repoHiroshi SHIBATA2020-09-241-0/+12
| | | | | | Fix test when run with US-ASCII encoding https://github.com/ruby/webrick/commit/f402aafb36bbd43be54621405da550643a1a1a4c
* [ruby/webrick] Only run test_big_bodies test on Ruby 2.5+Jeremy Evans2020-09-241-1/+1
| | | | | | | 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
* [ruby/webrick] Allow empty POST and PUT requests without content lengthJeremy Evans2020-09-241-0/+12
| | | | | | | | RFC 7230 section 3.3.3 allows for this. Fixes #30 https://github.com/ruby/webrick/commit/069e9b1908
* [ruby/webrick] Allow EPROTOTYPE error when writing junk to a socketJeremy Evans2020-09-241-1/+1
| | | | | | MacOS seems to raise this error in some cases. https://github.com/ruby/webrick/commit/0f0c9f1e61
* [ruby/webrick] Fix shutdown_pipe test issueJohn W Higgins2020-09-241-9/+20
| | | | https://github.com/ruby/webrick/commit/9676704c60
* [ruby/webrick] Ensure server port numbers are numeric and ensure they are ↵John W Higgins2020-09-241-0/+28
| | | | | | stored as integers https://github.com/ruby/webrick/commit/86ed621e11
* [ruby/webrick] Add test for shutdown_pipeJohn W Higgins2020-09-241-0/+12
| | | | https://github.com/ruby/webrick/commit/1daacc1849
* [ruby/webrick] Do not use ensure in a block without beginJeremy Evans2020-09-241-69/+71
| | | | | | | This syntax is not supported until Ruby 2.5, and Webrick still targets Ruby 2.3+. https://github.com/ruby/webrick/commit/fbe85b885f
* [ruby/webrick] Skip env-locale-sensitive CGI test on the "java" platformCharles Oliver Nutter2020-09-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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
* test/net/http/test_https.rb: The test logic was buggyYusuke Endoh2020-09-241-4/+4
| | | | | The expected certs must be `[CA_CERT, SERVER_CERT]` before 1.1.1g and `[SERVER_CERT]` after 1.1.1h.
* test/net/http/test_https.rb: the order of verify_callback seems to varyYusuke Endoh2020-09-241-4/+4
| | | | ... depending upon the environment.
* test/ostruct/test_ostruct.rb: Prevent "method redefined; discarding old foo"Yusuke Endoh2020-09-241-0/+3
|
* test/fiber/scheduler.rb: Prevent "instance variable @urgent not initialized"Yusuke Endoh2020-09-241-0/+2
|
* test/net/http/test_https.rb: Stop the error due to openssl 1.1.1hYusuke Endoh2020-09-241-4/+8
| | | | | | | | | | | | | | | | | | | 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.
* Revert "Manually merged from https://github.com/rubygems/rubygems/pull/2636"Hiroshi SHIBATA2020-09-23135-306/+0
| | | | | 31a6eaabc165d8a222e176f2c809d90622d88ec2 is obsoleted with https://github.com/rubygems/rubygems/pull/3820
* Manually merged from https://github.com/rubygems/rubygems/pull/2636Hiroshi SHIBATA2020-09-23135-0/+306
| | | | Enable Style/EmptyLinesAroundClassBody rubocop cop.
* strip trailing spaces [ci skip]Nobuyoshi Nakada2020-09-231-1/+1
|
* Update UnixSocket#recv_io tests to handle receiving a UnixSocketJeremy Evans2020-09-221-2/+8
| | | | | | | | 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]
* Revert "Prevent SystemStackError when calling super in module with activated ↵Jeremy Evans2020-09-221-31/+0
| | | | | | | | | | | | | | 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]
* Make hash returned by Hash#transform_values not have a defaultJeremy Evans2020-09-211-0/+1
| | | | | | | This sets an explicit default of nil. There is probably a better approach of removing the default. Fixes [Bug #17181]
* Simplify the implementation of Scheduler#blockBenoit Daloze2020-09-211-13/+15
| | | | | * This shows block() with a timeout is similar to #kernel_sleep and also does not need to change `@blocking`.
* Make `Thread#join` non-blocking.Samuel Williams2020-09-211-6/+16
|
* When setting current thread scheduler to nil, invoke `#close`.Samuel Williams2020-09-212-0/+40
|
* Remove from waiter in Mutex#lock with ensure when calling rb_scheduler_block()Benoit Daloze2020-09-201-0/+32
| | | | | * Previously this could lead to an invalid waiter entry and then trying to wake up that waiter would result in various issues in rb_mutex_unlock_th().
* [ruby/irb] Drop OMIT_ON_ASSIGNMENT and add :truncate option for ↵aycabta2020-09-191-22/+6
| | | | | | ECHO_ON_ASSIGNMENT https://github.com/ruby/irb/commit/4c89b0775b
* [ruby/rdoc] update all files if any file is newerNobuyoshi Nakada2020-09-181-4/+11
| | | | | | | | | Cross references need parse all files which define the subject names. This commit makes `--force-update` option enforce to parse all files if any file is newer than the previous parse, not only updated files. https://github.com/ruby/rdoc/commit/13e9a44896
* [ruby/rdoc] Support full filename to make a link for a text fileaycabta2020-09-181-0/+8
| | | | https://github.com/ruby/rdoc/commit/41db49c485
* Add missing goto found;Benoit Daloze2020-09-171-1/+2
| | | | | * To still remove the lock from the Thread's list of acquired locks. * Also to not wake up other waiters and preserve blocking behavior.
* Fix Mutex#unlock with a scheduler and thread contentionBenoit Daloze2020-09-171-0/+23
| | | | * It would hit "[BUG] unexpected THREAD_STOPPED" before.
* Document the various scheduler hooksBenoit Daloze2020-09-171-0/+3
|
* Call scheduler.block instead of scheduler.kernel_sleep for blocking ↵Benoit Daloze2020-09-172-1/+27
| | | | | | | Queue/SizedQueue operations * scheduler.unblock was already already called before but with no corresponding scheduler.block * add test that Queue#pop makes the scheduler wait until it gets an element.
* Rename scheduler.{mutex_lock,mutex_unlock} to {block,unblock}Benoit Daloze2020-09-171-12/+15
| | | | * Move #kernel_sleep next to #block as it is similar
* Use a similar pattern for waiting and readyBenoit Daloze2020-09-171-4/+3
|
* Fix typos [ci skip]Kazuhiro NISHIYAMA2020-09-171-2/+2
| | | | s/overriden/overridden/
* Fix assertion failed in Complex.polar without NDEBUG (#3551)Kenta Murata2020-09-161-0/+5
| | | Fixes [Bug #17172].