summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2021-03-16[ruby/openssl] config: revert to C implementation of OpenSSL::ConfigKazuki Yamaguchi
Revert OpenSSL::Config to using the OpenSSL API and remove our own parser implementation for the config file syntax. OpenSSL::Config now wraps a CONF object. Accessor methods deal with the object directly rather than Ruby-level internal state. This work is based on the old C code we used before 2010. https://github.com/ruby/openssl/commit/c891e0ea89 Notes: Merged: https://github.com/ruby/ruby/pull/4275
2021-03-16[ruby/openssl] test/openssl/test_config: skip test_get_value_ENV on LibreSSLKazuki Yamaguchi
LibreSSL has removed the feature to map environment variables onto the "ENV" section. https://github.com/ruby/openssl/commit/b70817faec Notes: Merged: https://github.com/ruby/ruby/pull/4275
2021-03-16[ruby/openssl] test/openssl/test_config: fix non-deterministic test caseKazuki Yamaguchi
Sort keys of a section before comparing. The ordering is not part of the API. This can cause a test failure if we use OpenSSL's C implementation. Fixes: 2ad65b5f673f ("config: support .include directive", 2018-08-16) https://github.com/ruby/openssl/commit/259e6fd2dc Notes: Merged: https://github.com/ruby/ruby/pull/4275
2021-03-16[ruby/openssl] test/openssl/test_config: add missing test case for ↵Kazuki Yamaguchi
Config.parse_config https://github.com/ruby/openssl/commit/9ce2ccf36d Notes: Merged: https://github.com/ruby/ruby/pull/4275
2021-03-16[ruby/openssl] config: remove deprecated methodsKazuki Yamaguchi
Remove 4 deprecated methods. The following two methods have been marked as deprecated since 2003, by r4531 (ruby.git commit 78ff3833fb67c8005a9b851037e74b3eea940aa3). - OpenSSL::Config#value - OpenSSL::Config#section Other two methods are removed because the corresponding functions disappeared in OpenSSL 1.1.0. - OpenSSL::Config#add_value - OpenSSL::Config#[]= https://github.com/ruby/openssl/commit/9783d7f21c Notes: Merged: https://github.com/ruby/ruby/pull/4275
2021-03-16[ruby/openssl] Define Cipher #ccm_data_len= for CCM mode ciphersSpencer McIntyre
Allow specifying just length to #update CCM mode ciphers need to specify the total plaintext or ciphertext length to EVP_CipherUpdate. Update the link to the tests file Define Cipher#ccm_data_len= for CCM mode ciphers Add a unit test for CCM mode Also check CCM is authenticated when testing https://github.com/ruby/openssl/commit/bb3816953b Notes: Merged: https://github.com/ruby/ruby/pull/4275
2021-03-16[ruby/rdoc] Allow empty .rdoc_optionsaycabta
https://github.com/ruby/rdoc/commit/0c8cb25b50 Notes: Merged: https://github.com/ruby/ruby/pull/4274
2021-03-16[ruby/rdoc] Allow partial default values to be overridden with .rdoc_optionsaycabta
https://github.com/ruby/rdoc/commit/e14800891f Notes: Merged: https://github.com/ruby/ruby/pull/4274
2021-03-16[ruby/rdoc] Fixed CodeFence without blank linesNobuyoshi Nakada
Currently a fenced code block needs a preceding blank line, it should not be required, as: https://github.github.com/gfm/#fenced-code-blocks > A fenced code block may interrupt a paragraph, and does not > require a blank line either before or after. Just recommended: https://docs.github.com/en/github/writing-on-github/creating-and-highlighting-code-blocks > We recommend placing a blank line before and after code blocks > to make the raw formatting easier to read. https://github.com/ruby/rdoc/commit/0e1776caf3 Notes: Merged: https://github.com/ruby/ruby/pull/4274
2021-03-16[ruby/rdoc] Support GFM tableNobuyoshi Nakada
https://github.com/ruby/rdoc/commit/9dc933df16 Notes: Merged: https://github.com/ruby/ruby/pull/4274
2021-03-15File.dirname optional levelNobuyoshi Nakada
* file.c (rb_file_dirname_n): chomp N level of base names. [Feature #12194] Notes: Merged: https://github.com/ruby/ruby/pull/4111
2021-03-15Check backref number buffer overrun [Bug #16376]xtkoba (Tee KOBAYASHI)
2021-03-12Fix integer/float remainder with infinity argument of opposite signJeremy Evans
Previously, the result was incorrect: 4.remainder(-Float::INFINITY) Before: => NaN After: => 4 4.2.remainder(-Float::INFINITY) Before: => NaN After: => 4.2 Fixes [Bug #6120] Notes: Merged: https://github.com/ruby/ruby/pull/4257
2021-03-11Create the test file under the created temporary directoryNobuyoshi Nakada
Fixes https://github.com/ruby/ruby/pull/4255
2021-03-10Remove cvar overtaken classes at end of test methodsJeremy Evans
Fixes issues when the same tests are executed more than once, which some CI machines do.
2021-03-10Add cvar overtaken testseileencodes
While working on another project we noticed that there were no tests for the cvar overtaken exception when using classes. This change adds a test for cvar overtaken with classes and moves the cvar overtaken test for modules into the new file. Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org> Notes: Merged: https://github.com/ruby/ruby/pull/4251
2021-03-08test/ruby/test_string.rb: make GitHub syntax-highlight correctlyYusuke Endoh
It looks like GitHub syntax-highlighting does not support an empty heredoc. This change adds a newline to make GitHub can handle the syntax appropriately. https://bugs.ruby-lang.org/issues/17662
2021-03-08[rubygems/rubygems] Remote test to check requireAditya Prakash
This test was triggering require of `rubygems/core_ext/tcpsocket_init` which overrides TCPSocket.initialize globally. Requires don't get reset between test runs and it was making other test unreliable. Fixes timeout of test on ruby master https://github.com/rubygems/rubygems/commit/fdfe5c9691 Notes: Merged: https://github.com/ruby/ruby/pull/4143
2021-03-08Sync latest development version of bundler & rubygemsDavid Rodríguez
Notes: Merged: https://github.com/ruby/ruby/pull/4143
2021-03-08[ruby/stringio] Check if closed in loopNobuyoshi Nakada
[Bug #17675] https://bugs.ruby-lang.org/issues/17675 https://github.com/ruby/stringio/commit/1ed61d0cbc
2021-03-08Fixed FD leaksNobuyoshi Nakada
2021-03-08Prefer to use omitHiroshi SHIBATA
2021-03-07[ruby/io-wait] Declare as Ractor-safeNobuyoshi Nakada
Fixes https://bugs.ruby-lang.org/issues/17659 https://github.com/ruby/io-wait/commit/ba338b4764 Notes: Merged: https://github.com/ruby/ruby/pull/4244
2021-03-07[ruby/io-wait] Refined uncommon device type testsNobuyoshi Nakada
https://github.com/ruby/io-wait/commit/0c73ebcf5d Notes: Merged: https://github.com/ruby/ruby/pull/4244
2021-03-06Undef Enumerator::Chain#{feed,next,next_values,peek,peek_values}Jeremy Evans
Previously these methods were defined but raised TypeError, which seems worse. Notes: Merged: https://github.com/ruby/ruby/pull/3811
2021-03-06Make Enumerator#{+,chain} create lazy chain if any included enumerator is lazyJeremy Evans
Implements [Feature #17347] Notes: Merged: https://github.com/ruby/ruby/pull/3811
2021-03-06Fix calling enumerator methods such as with_index on Enumerator::ChainJeremy Evans
This previously raised a TypeError. Wrap the Enumerator::Chain in an Enumerator to work around the problem. Fixes [Bug #17216] Notes: Merged: https://github.com/ruby/ruby/pull/3811
2021-03-06[ruby/irb] Make save-history extension safe for concurrent useJeremy Evans
This makes the save-history extension check for modifications to the history file before saving it. If the history file was modified after the history was loaded and before it was saved, append only the new history lines to the history file. This can result in more lines in the history file than SAVE_HISTORY allows. However, that will be fixed the next time irb is run and the history is saved. Fixes [Bug #13654] https://github.com/ruby/irb/commit/041ef53845
2021-03-05[ruby/irb] Add a test for not continuing when endless range at eolaycabta
https://github.com/ruby/irb/commit/1020ac9c65
2021-02-26Oops! Add another test and fix to_proc implementationAaron Patterson
2021-02-26Fiddle::Function responds to to_procAaron Patterson
This lets us cast a Fiddle::Function to a block, allowing is to write things like: ```ruby f = Fiddle::Function.new(@libc['strcpy'], [TYPE_VOIDP, TYPE_VOIDP], TYPE_VOIDP) define_method :strcpy, &f ```
2021-02-25Revert "Add tests for bug 17652"Aaron Patterson
This reverts commit a9920e7782f225b97e173a88640fe9e116b9964f.
2021-02-25Add tests for bug 17652Peter Zhu
Notes: Merged: https://github.com/ruby/ruby/pull/4227
2021-02-24Reverting PR #4221Aaron Patterson
It seems this breaks tests on Solaris, so I'm reverting it until we figure out the right fix. http://rubyci.s3.amazonaws.com/solaris11-sunc/ruby-master/log/20210224T210007Z.fail.html.gz
2021-02-24Add tests for bug 17652Peter Zhu
Notes: Merged: https://github.com/ruby/ruby/pull/4221
2021-02-23added mutexes for socket and connection lists on win32Andrew Aladjev
Notes: Merged: https://github.com/ruby/ruby/pull/4212
2021-02-22Check for cyclic prepend before making originAlan Wu
It's important to only make the origin when the prepend goes through, as the precense of the origin informs whether to do an origin backfill. This plus 2d877327e fix [Bug #17590]. Notes: Merged: https://github.com/ruby/ruby/pull/4181
2021-02-22Send :fiber_switch event for almost every fiber_switch (#4207)nicholas a. evans
With this patch, TracePoint receives a `:fiber_switch` event for _almost_ every fiber switch. Previously, it would not be sent when an exception was going to be raised. Now the event should only be blockable by an interrupt (including `Thread#raise`) or a fatal error. Additionally, interrupts will now be checked on the return fiber _before_ re-raising the terminating unhandled exception. And a fiber that terminates with an unhandled exception no longer creates a pending interrupt on its thread. The exception will be raised in the return fiber the same way as `Fiber#raise`: using `cont.value` with `cont.argc == -1` I moved `rb_exc_raise` from `fiber_store` to the end of `fiber_switch` after _all_ of the other cleanup code: `fiber_stack_release`, `th->blocking` increment, `RUBY_VM_CHECK_INTS`, and `EXEC_EVENT_HOOK`. It seems to me that skipping those other cleanup steps may have also resulted in other bugs. Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2021-02-21[ruby/reline] Add a test for suppressing crash when dynamic prompt returns emptyaycabta
ref. https://github.com/ruby/reline/pull/262 https://github.com/ruby/reline/commit/b98bc3c329
2021-02-21[ruby/reline] Move script files for yamatanooroti testsaycabta
https://github.com/ruby/reline/commit/03031b885d
2021-02-21[ruby/reline] Return 1 when char width not foundaycabta
This fixes ruby/reline#261. https://github.com/ruby/reline/commit/3cf1213014
2021-02-20Make String#{strip,lstrip}{,!} strip leading NUL bytesJeremy Evans
The documentation already specifies that they strip whitespace and defines whitespace to include null. This wraps the new behavior in the appropriate guards in the specs, but does not specify behavior for previous versions, because this is a bug that could be backported. Fixes [Bug #17467] Notes: Merged: https://github.com/ruby/ruby/pull/4164
2021-02-19Fix backtrace to not skip frames with iseq without pcJeremy Evans
Previously, frames with iseq but no pc were skipped (even before the refactoring in 3b24b7914c16930bfadc89d6aff6326a51c54295). Because the entire backtrace was procesed before the refactoring, this was handled by using later frames instead. However, after the refactoring, we need to handle those frames or they get lost. Keep two iteration counters when iterating, one for the desired backtrace size (so we generate the desired number of frames), and one for the actual backtrace size (so we don't process off the end of the stack). When skipping over an iseq frame with no pc, decrement the counter for the desired backtrace, so it will continue to process the expected number of backtrace frames. Fixes [Bug #17581] Notes: Merged: https://github.com/ruby/ruby/pull/4120
2021-02-19Fix typo [ci skip]Shugo Maeda
2021-02-19invalidate negative cache any time.Koichi Sasada
negative cache on a class which does not have subclasses was not invalidated, but it should be invalidated because other classes can cache this negative cache. [Bug #17553] Notes: Merged: https://github.com/ruby/ruby/pull/4201
2021-02-19ripper: fix a bug of Ripper::Lexer with syntax error and heredoc [Bug #17644]Shugo Maeda
2021-02-18[ruby/readline-ext] Use omitNobuyoshi Nakada
https://github.com/ruby/readline-ext/commit/f6dff0a9f6
2021-02-16Parse "-00:00" as UTC for the round-trip [Feature #17544]Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/4075
2021-02-16UTC zone should be still "+00:00" [Feature #17544]Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/4075
2021-02-16strftime.c: support unknown offset UTC in RFC 3339 [Feature #17544]Nobuyoshi Nakada
In RFC 3339, -00:00 is used for the time in UTC is known, but the offset to local time is unknown. Support that representation by `-` flag for `z`. Notes: Merged: https://github.com/ruby/ruby/pull/4075