summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-03-18Make a few functions staticAlan Wu
Notes: Merged: https://github.com/ruby/ruby/pull/4285
2021-03-18Avoid rehashing in Hash#replace/dup/initialize_copy [Bug #16996]Marc-Andre Lafortune
2021-03-18Avoid rehashing in Hash#select/reject [Bug #16996]Marc-Andre Lafortune
2021-03-18Try to fix errors in TestIRB::TestHistory tooKazuhiro NISHIYAMA
https://github.com/ruby/actions/runs/2137935523?check_suite_focus=true#step:9:562 ``` 1) Error: TestIRB::TestHistory#test_history_concurrent_use: Errno::EACCES: Permission denied @ dir_s_mkdir - /home/runner/.config/irb /home/runner/work/actions/actions/ruby/lib/fileutils.rb:253:in `mkdir' /home/runner/work/actions/actions/ruby/lib/fileutils.rb:253:in `fu_mkdir' /home/runner/work/actions/actions/ruby/lib/fileutils.rb:231:in `block (2 levels) in mkdir_p' /home/runner/work/actions/actions/ruby/lib/fileutils.rb:229:in `reverse_each' /home/runner/work/actions/actions/ruby/lib/fileutils.rb:229:in `block in mkdir_p' /home/runner/work/actions/actions/ruby/lib/fileutils.rb:211:in `each' /home/runner/work/actions/actions/ruby/lib/fileutils.rb:211:in `mkdir_p' /home/runner/work/actions/actions/ruby/lib/irb/init.rb:355:in `rc_file_generators' /home/runner/work/actions/actions/ruby/lib/irb/init.rb:330:in `rc_file' /home/runner/work/actions/actions/ruby/test/irb/test_history.rb:170:in `block in assert_history' /home/runner/work/actions/actions/ruby/lib/tmpdir.rb:96:in `mktmpdir' /home/runner/work/actions/actions/ruby/test/irb/test_history.rb:168:in `assert_history' /home/runner/work/actions/actions/ruby/test/irb/test_history.rb:133:in `test_history_concurrent_use' ```
2021-03-18Fix errors when XDG_CONFIG_HOME points to non-writable directoryKazuhiro NISHIYAMA
`$HOME/.config` is not writable on CI because I think tests should not corrupt user's data. And GitHub Actions CI sets `XDG_CONFIG_HOME` since `Version: 20210309.1`. https://github.com/ruby/actions/runs/2130811016?check_suite_focus=true#step:16:301 ``` Errno::EACCES: Permission denied @ dir_s_mkdir - /home/runner/.config/irb ```
2021-03-18* 2021-03-18 [ci skip]git
2021-03-17return bool instead of VALUEAaron Patterson
Notes: Merged: https://github.com/ruby/ruby/pull/4279
2021-03-17Use rb_fstring for "defined" strings.Aaron Patterson
We can take advantage of fstrings to de-duplicate the defined strings. This means we don't need to keep the list of defined strings on the VM (or register them as mark objects) Notes: Merged: https://github.com/ruby/ruby/pull/4279
2021-03-17Refactor vm_defined to return a booleanAaron Patterson
We just need this function to return whether or not the thing we're looking for is defined. If it's defined, return something true, otherwise false. Notes: Merged: https://github.com/ruby/ruby/pull/4279
2021-03-17Stop calling `rb_iseq_defined_string` in vm_definedAaron Patterson
We already have access to the string from the iseqs, so we can stop calling this function. Notes: Merged: https://github.com/ruby/ruby/pull/4279
2021-03-17Store strings for `defined` in the iseqsAaron Patterson
We can know the string used for "defined" calls at compile time, then store the string in the instruction sequences Notes: Merged: https://github.com/ruby/ruby/pull/4279
2021-03-17[DOC] Update README [ci skip]Nobuyoshi Nakada
* Use `autogen.sh`. * The subversion repository is only for old versions, and secondary now. * Moved long links to footnotes.
2021-03-17autogen.sh: Make it work with sh (not bash)Yusuke Endoh
2021-03-17Remove unused DEFAULT_KCODEKazuhiro NISHIYAMA
2021-03-17Improved autogen.shNobuyoshi Nakada
* update in the source directory * make symbolic links instead of copies * forward the arguments to autoreconf as-is
2021-03-17get rid of aclocal (#4280)卜部昌平
Notes: Merged-By: mame <[email protected]>
2021-03-17autogen.sh: Allow AUTORECONF envvar to specify the autoreconf executableYusuke Endoh
2021-03-17autogen.sh: AddedYusuke Endoh
Currently it just runs "autoreconf --install"
2021-03-17[Feature #17684] Declare --disable-gems is for debuggingNARUSE, Yui
2021-03-17Adjusted indents [ci skip]Nobuyoshi Nakada
2021-03-16Skip refined method when exporting methods with changed visibilityJeremy Evans
Previously, attempting to change the visibility of a method in a singleton class for a class/module that is prepended to and refined would raise a NoMethodError. Fixes [Bug #17519] Notes: Merged: https://github.com/ruby/ruby/pull/4200
2021-03-17test_zlib(test_path_tmpfile): fix Zlib instance leakSorah Fukumori
follow-up: commit cf831f49189c4a890da6845e39199a5dfaf4fb48
2021-03-17zlib: fix Gzip{Writer,Reader}.new fails with a O_TMPFILE fileSorah Fukumori
2021-03-16LLDB: Introduce dump_page helperMatt Valentine-House
This dumps out object type information for every object on a page in the form: bits [LM R ] T_CLASS [389]: Addr: 0x1007ebcf0 (flags: 0x100000062) Notes: Merged: https://github.com/ruby/ruby/pull/4277
2021-03-16LLDB: Extract a dump_bits function from rpMatt Valentine-House
that dumps the heap page bitmaps for a slot Notes: Merged: https://github.com/ruby/ruby/pull/4277
2021-03-17* 2021-03-17 [ci skip]git
2021-03-16Improve Enumerable#tally performanceNobuyoshi Nakada
Iteration per second (i/s) | |compare-ruby|built-ruby| |:------|-----------:|---------:| |tally | 52.814| 114.936| | | -| 2.18x| Notes: Merged: https://github.com/ruby/ruby/pull/4278
2021-03-16test/openssl/test_config: skip tests for .include on older OpenSSLKazuki Yamaguchi
The .include directive was initially added by OpenSSL 1.1.1, but the syntax was later modified in 1.1.1b to improve compatibility with the parser in <= 1.1.0. The test case expects 1.1.1b's parser. https://github.com/openssl/openssl/commit/95f59d398c3f28f7ee50f092106c5910d25f9e30 The test case is failing on Ubuntu 18.04 because it still uses the initial 1.1.1 release: http://rubyci.s3.amazonaws.com/graviton2/ruby-master/log/20210316T120003Z.fail.html.gz
2021-03-16test/openssl/test_cipher: skip AES-CCM tests on OpenSSL <= 1.1.1bKazuki Yamaguchi
AES CCM mode in OpenSSL <= 1.1.1b was overly strict in the parameters assignment order. This has been relaxed by OpenSSL 1.1.1c. https://github.com/openssl/openssl/commit/b48e3be947ddc5da6b5a86db8341081c72b9a4ee The test case is failing on Ubuntu 18.04 because it still uses the initial 1.1.1 release and has the issue: http://rubyci.s3.amazonaws.com/graviton2/ruby-master/log/20210316T120003Z.fail.html.gz
2021-03-16test/ruby/test_regexp.rb: Avoid "ambiguity between regexp and two divisions"Yusuke Endoh
2021-03-16[ruby/openssl] sample: update obsolete API useKazuki Yamaguchi
https://github.com/ruby/openssl/commit/dafa851c0d Notes: Merged: https://github.com/ruby/ruby/pull/4275
2021-03-16[ruby/openssl] sample: avoid "include OpenSSL"Kazuki Yamaguchi
It is not a common practice and should not be done since it causes name clash: for example, Digest and Random are provided by other standard libraries of Ruby. Fixes: https://github.com/ruby/openssl/issues/419 https://github.com/ruby/openssl/commit/6a6444984b Notes: Merged: https://github.com/ruby/ruby/pull/4275
2021-03-16[ruby/openssl] test: adjust test cases for LibreSSL 3.2.4Kazuki Yamaguchi
LibreSSL 3.2.4 made the certificate verification logic back closer to pre-3.2.2 one, which is more compatible with OpenSSL. Part of the fixes added by commit a0e98d48c91f ("Enhance TLS 1.3 support on LibreSSL 3.2/3.3", 2020-12-03) is required for 3.2.2 and 3.2.3 only (and ~3.3.1, however 3.3 does not have a stable release yet). Since both releases are security fix, it should be safe to remove those special treatment from our test suite. While we are at it, TestSSL#test_ecdh_curves is split into TLS 1.2 and TLS 1.3 variants for clarity. https://github.com/ruby/openssl/commit/a9954bac22 Notes: Merged: https://github.com/ruby/ruby/pull/4275
2021-03-16[ruby/openssl] bn: check -1 return from BIGNUM functionsKazuki Yamaguchi
Although the manpage says that BIGNUM functions return 0 on error, OpenSSL versions before 1.0.2n and current LibreSSL versions may return -1 instead. Note that the implementation of OpenSSL::BN#mod_inverse is extracted from BIGNUM_2c() macro as it didn't really share the same function signature with others. https://github.com/ruby/openssl/commit/9b59f34345 Notes: Merged: https://github.com/ruby/ruby/pull/4275
2021-03-16[ruby/openssl] Fixed the results of OpenSSL::Timestamp::Response#failure_infoNobuyoshi Nakada
Made stored values `Symbol`s instead of `ID`s. Fixes https://bugs.ruby-lang.org/issues/17625 Co-Authored-By: xtkoba (Tee KOBAYASHI) <[email protected]> https://github.com/ruby/openssl/commit/f2d004679a Notes: Merged: https://github.com/ruby/ruby/pull/4275
2021-03-16[ruby/openssl] Enhance TLS 1.3 support on LibreSSL 3.2/3.3Jeremy Evans
This defines TLS1_3_VERSION when using LibreSSL 3.2+. LibreSSL 3.2/3.3 doesn't advertise this by default, even though it will use TLS 1.3 in both client and server modes. Changes between LibreSSL 3.1 and 3.2/3.3 broke a few tests, Defining TLS1_3_VERSION by itself fixes 1 test failure. A few tests now fail on LibreSSL 3.2/3.3 unless TLS 1.2 is set as the maximum version, and this adjusts those tests. The client CA test doesn't work in LibreSSL 3.2+, so I've marked that as pending. For the hostname verification, LibreSSL 3.2.2+ has a new stricter hostname verifier that doesn't like subjectAltName such as c*.example.com and d.*.example.com, so adjust the related tests. With these changes, the tests pass on LibreSSL 3.2/3.3. https://github.com/ruby/openssl/commit/a0e98d48c9 Notes: Merged: https://github.com/ruby/ruby/pull/4275
2021-03-16[ruby/openssl] pkey/ec: remove OpenSSL::PKey::EC::Group.new(ec_method) formKazuki Yamaguchi
The form created an empty EC_GROUP object with the specified EC_METHOD. However, the feature was unfinished and not useful in any way because OpenSSL::PKey::EC::Group did not implement wrappers for necessary functions to set actual parameters for the group, namely EC_GROUP_set_curve() family. EC_GROUP object creation with EC_METHOD explicitly specified is deprecated in OpenSSL 3.0, as it was apparently not intended for use outside OpenSSL. It is still possible to create EC_GROUP, but without EC_METHOD explicitly specified - OpenSSL chooses the appropriate EC_METHOD for the curve type. The OpenSSL::PKey::EC::Group.new(<:GFp|:GF2m>, p, a, b) form will continue to work. https://github.com/ruby/openssl/commit/df4bec841f Notes: Merged: https://github.com/ruby/ruby/pull/4275
2021-03-16[ruby/openssl] ssl: remove SSL::SSLContext#tmp_ecdh_callbackKazuki Yamaguchi
The underlying API SSL_CTX_set_tmp_ecdh_callback() was removed by LibreSSL >= 2.6.1 and OpenSSL >= 1.1.0, in other words, it is not supported by any non-EOL versions of OpenSSL. The wrapper was initially implemented in Ruby 2.3 and has been deprecated since Ruby/OpenSSL 2.0 (bundled with Ruby 2.4) with explicit warning with rb_warn(). https://github.com/ruby/openssl/commit/ee037e1460 Notes: Merged: https://github.com/ruby/ruby/pull/4275
2021-03-16[ruby/openssl] ssl: retry write on EPROTOTYPE on macOSKazuki Yamaguchi
Errno::EPROTOTYPE is not supposed to be raised by SSLSocket#write. However, on macOS, send(2) which is called via SSL_write() can occasionally return EPROTOTYPE. Retry SSL_write() so that we get a proper error, just as ext/socket does. Reference: https://bugs.ruby-lang.org/issues/14713 Reference: https://github.com/ruby/openssl/issues/227 https://github.com/ruby/openssl/commit/2e700c80bf Notes: Merged: https://github.com/ruby/ruby/pull/4275
2021-03-16[ruby/openssl] test/openssl/test_x509store: tidy up tests for ↵Kazuki Yamaguchi
X509::Store#add_cert Rename the test case to test_add_cert_duplicate to clarify what it is actually testing. https://github.com/ruby/openssl/commit/4cc3c4110f Notes: Merged: https://github.com/ruby/ruby/pull/4275
2021-03-16[ruby/openssl] test/openssl/test_x509store: break up test_verifyKazuki Yamaguchi
The test case is huge and too complex. Break it up into separate test cases for better documentation. https://github.com/ruby/openssl/commit/61012df03b Notes: Merged: https://github.com/ruby/ruby/pull/4275
2021-03-16[ruby/openssl] x509store: update rdoc for X509::Store and X509::StoreContextKazuki Yamaguchi
Add more details about each method, and add reference to OpenSSL man pages. https://github.com/ruby/openssl/commit/02b6f82c73 Notes: Merged: https://github.com/ruby/ruby/pull/4275
2021-03-16[ruby/openssl] x509store: fix memory leak in X509::StoreContext.newKazuki Yamaguchi
The certificate passed as the second argument was not properly free'd in the error paths. https://github.com/ruby/openssl/commit/9561199b9f Notes: Merged: https://github.com/ruby/ruby/pull/4275
2021-03-16[ruby/openssl] x509store: avoid ossl_raise() calls with NULL messageKazuki Yamaguchi
Use the OpenSSL function name that caused the error to generate a better error message. https://github.com/ruby/openssl/commit/b31809ba3d Notes: Merged: https://github.com/ruby/ruby/pull/4275
2021-03-16[ruby/openssl] x509store: refactor X509::StoreContext#chainKazuki Yamaguchi
Use ossl_x509_sk2ary() to create an array of OpenSSL::X509::Certificate from STACK_OF(X509). https://github.com/ruby/openssl/commit/fa1da69f92 Notes: Merged: https://github.com/ruby/ruby/pull/4275
2021-03-16[ruby/openssl] x509store: emit warning if arguments are given to X509::Store.newKazuki Yamaguchi
Anything passed to OpenSSL::X509::Store.new was always ignored. Let's emit an explicit warning to not confuse users. https://github.com/ruby/openssl/commit/d173700eeb Notes: Merged: https://github.com/ruby/ruby/pull/4275
2021-03-16[ruby/openssl] x509store: let X509::Store#add_file raise TypeError if nil is ↵Kazuki Yamaguchi
given Undo special treatment of nil and simply pass the value to StringValueCStr(). nil was never a valid argument for the method; OpenSSL::X509::StoreError with an unhelpful error message "system lib" was raised in that case. https://github.com/ruby/openssl/commit/fb2fcbb137 Notes: Merged: https://github.com/ruby/ruby/pull/4275
2021-03-16[ruby/openssl] [DOC] Fix RDoc markupNobuhiro IMAI
https://github.com/ruby/openssl/commit/f36af95519 Notes: Merged: https://github.com/ruby/ruby/pull/4275
2021-03-16[ruby/openssl] Fix typo in documentationClaus Lensbøl
The socket is called ssl_connection, not connection https://github.com/ruby/openssl/commit/642783aeda Notes: Merged: https://github.com/ruby/ruby/pull/4275
2021-03-16[ruby/openssl] ssl: initialize verify_mode and verify_hostname with default ↵Kazuki Yamaguchi
values SSLContext's verify_mode expects an SSL_VERIFY_* constant (an integer) and verify_hostname expects either true or false. However, they are set to nil after calling OpenSSL::SSL::SSLContext.new, which is surprising. Set a proper value to them by default: verify_mode is set to OpenSSL::SSL::VERIFY_NONE and verify_hostname is set to false by default. Note that this does not change the default behavior. The certificate verification was never performed unless verify_mode is set to OpenSSL::SSL::VERIFY_PEER by a user. The same applies to verify_hostname. https://github.com/ruby/openssl/commit/87d869352c Notes: Merged: https://github.com/ruby/ruby/pull/4275