summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-04-30Correct documentation example on Hash#digNick Kelley
Fixes [Misc #17842]. The current documentation suggests that: {foo: {bar: {baz: 2}}}.dig(:foo, :bar) # => {:bar=>{:baz=>2}} when it should be: {foo: {bar: {baz: 2}}}.dig(:foo, :bar) # => {:baz=>2} Notes: Merged: https://github.com/ruby/ruby/pull/4441
2021-04-30Silence GCC 11 warningsxtkoba
``` ../strftime.c: In function 'rb_strftime_with_timespec': ../strftime.c:392:39: warning: comparison is always false due to limited range of data type [-Wtype-limits] 392 | if (vtm->wday < 0 || vtm->wday > 6) | ^ ../strftime.c:403:39: warning: comparison is always false due to limited range of data type [-Wtype-limits] 403 | if (vtm->wday < 0 || vtm->wday > 6) | ^ ``` Notes: Merged: https://github.com/ruby/ruby/pull/4435
2021-04-30[ruby/irb] Need reline >= 0.1.6ima1zumi
irb 1.3.5 need reline >= 0.1.6 because irb use `Reline::IOGate.in_pasting?`. This method defined after reline 0.1.6. fix #228. https://github.com/ruby/irb/commit/6b7b8fc324
2021-04-29Update Time documentationBurdette Lamar
2021-04-29lldb: Warn when attempting to dump invalid pagesMatt Valentine-House
Notes: Merged: https://github.com/ruby/ruby/pull/4431
2021-04-30* 2021-04-30 [ci skip]git
2021-04-30test/net/smtp/test_smtp.rb: wait a moment before socket is closedYusuke Endoh
On Solaris, Socket.tcp seems to fail with EINVAL if the server closes the connection immediately after accpeted. I think this is a bug of Socket.tcp, but seems difficult to fix soon. http://rubyci.s3.amazonaws.com/solaris11-sunc/ruby-master/log/20210429T100007Z.fail.html.gz ``` 1) Failure: Net::TestSMTP#test_eof_error_backtrace [/export/home/chkbuild/chkbuild-sunc/tmp/build/20210429T100007Z/ruby/test/net/smtp/test_smtp.rb:193]: [ruby-core:78550] [Bug #13018]. [EOFError] exception expected, not #<Net::ReadTimeout: Net::ReadTimeout>. ```
2021-04-29* 2021-04-29 [ci skip]git
2021-04-28Specify -c to emit pch with clang (#4423)Takashi Kokubun
[Bug #17836] Notes: Merged-By: k0kubun <takashikkbn@gmail.com>
2021-04-28Removed unused macro HAVE_CONFIG_HNobuyoshi Nakada
It seems like a vestige of ext/md5.
2021-04-28NDEBUG is ignored since Ruby 3.0Nobuyoshi Nakada
2021-04-28Guard for < Ruby 3.0Hiroshi SHIBATA
2021-04-28[ruby/ostruct] Add compatibility for to_h with block in Ruby 2.5Marc-Andre Lafortune
https://github.com/ruby/ostruct/commit/da45de5068
2021-04-28[ruby/ostruct] Compatibility with Ruby 2.5Marc-Andre Lafortune
https://github.com/ruby/ostruct/commit/ecd9fafdf8
2021-04-28[ruby/optparse] Add EditorConfig fileAlexander Popov
More info here: https://editorconfig.org/ For example, `ruby/ruby` has it: https://github.com/ruby/ruby/blob/05ebaee/.editorconfig Also fix some offenses. https://github.com/ruby/optparse/commit/29402e7e0e
2021-04-28[ruby/net-imap] Fix typo intentionaly -> intentionally [ci skip]Ryuta Kamizono
https://github.com/ruby/net-imap/commit/4057c662e7
2021-04-28[ruby/net-http] Initialize OpenSSL early before creating TCPSocketJeremy Evans
OpenSSL make take some time to initialize, and it would be best to take that time before connecting instead of after. From joshc on Redmine. Fixes Ruby Bug #9459 https://github.com/ruby/net-http/commit/14e09fba24
2021-04-28[ruby/net-http] Fix the regexp used to clean the hostJean Boussier
Introduced in https://github.com/ruby/ruby/commit/c1652035644 `/s` marks the regexp as encoded with Windows-31J which makes little sense. Nurse thinks the intent was to use `/m` for a multi-line regexp. https://github.com/ruby/net-http/commit/6c15342cdf
2021-04-28[ruby/net-http] Decode user and password from env configured proxyLukas Eipert
If someone sets an env variable defining a http_proxy, containing a username / password with percent-encoded characters, then the resulting base64 encoded auth header will be wrong. For example, suppose a username is `Y\X` and the password is `R%S] ?X`. Properly URL encoded the proxy url would be: http://Y%5CX:R%25S%5D%20%3FX@proxy.example:8000 The resulting proxy auth header should be: `WVxYOlIlU10gP1g=`, but the getters defined by ruby StdLib `URI` return a username `Y%5CX` and password `R%25S%5D%20%3FX`, resulting in `WSU1Q1g6UiUyNVMlNUQlMjAlM0ZY`. As a result the proxy will deny the request. Please note that this is my first contribution to the ruby ecosystem, to standard lib especially and I am not a ruby developer. References: - https://gitlab.com/gitlab-org/gitlab/-/issues/289836 - https://bugs.ruby-lang.org/projects/ruby-master/repository/trunk/revisions/58461 - https://bugs.ruby-lang.org/issues/17542 https://github.com/ruby/net-http/commit/e57d4f38aa
2021-04-28[ruby/net-http] Replace Timeout.timeout in Net:HTTP#connectmohamed
Use Socket.tcp's connect_timeout option instead https://github.com/ruby/net-http/commit/753cae3bbc
2021-04-28[ruby/net-smtp] mod: bump to a new VERSION that could be checked for ↵Tom Freudenberg
testings >0.2.1 https://github.com/ruby/net-smtp/commit/8f2c9323e2
2021-04-28[ruby/net-smtp] Removed needless files from Gem::Specification#filesHiroshi SHIBATA
https://github.com/ruby/net-smtp/commit/69bba6b125
2021-04-28[ruby/net-smtp] Replace Timeout.timeout with socket timeoutmohamed
Timeout.timeout is inefficient since it spins up a new thread for each invocation, use Socket.tcp's connect_timeout option instead https://github.com/ruby/net-smtp/commit/6ae4a59f05
2021-04-28[ruby/net-smtp] Net::SMTP.start() and #start() accepts ssl_context_params ↵Tom Freudenberg
keyword argument Additional params are passed to OpenSSL::SSL::SSLContext#set_params. For example, `Net::SMTP#start(ssl_context_params: { cert_store: my_store, timeout: 123 })` calls `set_params({ cert_store: my_store, timeout: 123 })`. https://github.com/ruby/net-smtp/commit/4213389c21
2021-04-28test/net/ftp/test_ftp.rb: Use RubyVM::JIT instead of RubyVM::MJITYusuke Endoh
2021-04-28test/net/ftp/test_ftp.rb: reduce the size of a long responseYusuke Endoh
"9" * 999999999 (about 1 GB) was too large for some CI servers. This commit changes the size to 999999 (about 1 MB). http://rubyci.s3.amazonaws.com/scw-9d6766/ruby-master/log/20210427T141707Z.fail.html.gz http://rubyci.s3.amazonaws.com/raspbian10-aarch64/ruby-master/log/20210427T145408Z.fail.html.gz
2021-04-28test/net/ftp/test_ftp.rb: remove unused variableYusuke Endoh
2021-04-28test/ruby/test_fiber.rb: reduce the count of object creation to cause GCYusuke Endoh
... on Solaris. This is the same as 547887138f19959f649b1c0dbcde5659ae3878ed. http://rubyci.s3.amazonaws.com/solaris10-gcc/ruby-master/log/20210427T160003Z.fail.html.gz ``` [ 7667/20965] TestFiber#test_fork_from_fiber/export/home/users/chkbuild/cb-gcc/tmp/build/20210427T160003Z/ruby/test/ruby/test_fiber.rb:397:in `transfer': can't alloc machine stack to fiber (1 x 139264 bytes): Not enough space (FiberError) from /export/home/users/chkbuild/cb-gcc/tmp/build/20210427T160003Z/ruby/test/ruby/test_fiber.rb:397:in `block (6 levels) in test_fork_from_fiber' from /export/home/users/chkbuild/cb-gcc/tmp/build/20210427T160003Z/ruby/test/ruby/test_fiber.rb:396:in `times' from /export/home/users/chkbuild/cb-gcc/tmp/build/20210427T160003Z/ruby/test/ruby/test_fiber.rb:396:in `block (5 levels) in test_fork_from_fiber' from /export/home/users/chkbuild/cb-gcc/tmp/build/20210427T160003Z/ruby/test/ruby/test_fiber.rb:392:in `fork' from /export/home/users/chkbuild/cb-gcc/tmp/build/20210427T160003Z/ruby/test/ruby/test_fiber.rb:392:in `block (4 levels) in test_fork_from_fiber' = 0.88 s ... 1) Failure: TestFiber#test_fork_from_fiber [/export/home/users/chkbuild/cb-gcc/tmp/build/20210427T160003Z/ruby/test/ruby/test_fiber.rb:409]: [ruby-core:41456]. <0> expected but was <1>. ```
2021-04-28* 2021-04-28 [ci skip]git
2021-04-27Fix Monitor to lock per Fiber, like Mutex [Bug #17827]Benoit Daloze
2021-04-27lldb: highlight the slot when using dump_page_rvalueMatt Valentine-House
Notes: Merged: https://github.com/ruby/ruby/pull/4420
2021-04-27lldb: dump_page_rvalue - dump a heap page containing an RVALUEMatt Valentine-House
rather than having to do this in a two step process: 1. heap_page obj 2. dump_page $2 (or whatever lldb variable heap_page set) we can now just dump_page_rvalue obj Notes: Merged: https://github.com/ruby/ruby/pull/4420
2021-04-27lldb: Add Freelist Index to dump_page outputMatt Valentine-House
Notes: Merged: https://github.com/ruby/ruby/pull/4420
2021-04-27[ruby/net-ftp] Replace "iff" with "if and only if"Gannon McGibbon
iff means if and only if, but readers without that knowledge might assume this to be a spelling mistake. To me, this seems like exclusionary language that is unnecessary. Simply using "if and only if" instead should suffice. https://github.com/ruby/net-ftp/commit/e920473618
2021-04-27[ruby/net-ftp] Add test casesShugo Maeda
https://github.com/ruby/net-ftp/commit/865232bb2a
2021-04-27[ruby/net-ftp] Reduce resource cosumption of Net::FTP::TIME_PARSERShugo Maeda
Reported by Alexandr Savca as a DoS vulnerability, but Net::FTP is a client library and the impact of the issue is low, so I have decided to fix it as a normal issue. Based on patch by nobu. https://github.com/ruby/net-ftp/commit/a93af636f8
2021-04-27[ruby/net-ftp] Close the passive connection data socket if there is an error ↵Jeremy Evans
setting up the transfer Previously, the connection leaked in this case. This uses begin/ensure and checking for an error in the ensure block. An alternative approach would be to not even perform the connection until after the RETR (or other) command has been sent. However, I'm not sure all FTP servers support that. The current behavior is: * Send (PASV/EPSV) * Connect to the host/port returned in 227/229 reply * Send (RETR/other command) Changing it to connect after the RETR could break things. FTP servers might expect that the client has already connected before sending the RETR. The alternative approach is more likely to introduce backwards compatibility issues, compared to the begin/ensure approach taken here. Fixes Ruby Bug 17027 https://github.com/ruby/net-ftp/commit/6e8535f076
2021-04-27[ruby/net-ftp] Replace Timeout.timeout with socket timeoutmohamed
Timeout.timeout is inefficient since it spins up a new thread for each invocation, use Socket.tcp's connect_timeout option instead when we aren't using SOCKS (we can't replace Timeout.timeout for SOCKS yet since SOCKSSocket doesn't have a connect_timeout option). https://github.com/ruby/net-ftp/commit/d65910132f
2021-04-27[ruby/net-ftp] Re-apply 827e471d438fdec1ae329afb5912b8e06d534823Hiroshi SHIBATA
https://github.com/ruby/net-ftp/commit/3ca80368c4
2021-04-27[ruby/matrix] Guard for < Ruby 3.0Hiroshi SHIBATA
https://github.com/ruby/matrix/commit/1ef660c627
2021-04-27[ruby/matrix] v0.4.1Marc-Andre Lafortune
https://github.com/ruby/matrix/commit/f7c9981907
2021-04-27[ruby/matrix] v0.4.0Marc-Andre Lafortune
https://github.com/ruby/matrix/commit/baea4b90d4
2021-04-27[ruby/matrix] Use Gemfile instead of ↵Hiroshi SHIBATA
Gem::Specification#add_development_dependency. https://github.com/ruby/matrix/commit/1381fde5c1
2021-04-27[ruby/gdbm] Add dependency to gdbm package on mingwLars Kanis
RubyInstaller2 supports metadata tags for installation of dependent MSYS2/MINGW libraries. The openssl gem requires the mingw-openssl package to be installed on the system, which the gem installer takes care about, when this tag is set. The feature is documented here: https://github.com/oneclick/rubyinstaller2/wiki/For-gem-developers#msys2-library-dependency Fixes https://github.com/oneclick/rubyinstaller2/issues/163 https://github.com/ruby/gdbm/commit/d95eed3e86
2021-04-27[ruby/pathname] gemspec: Explicitly list 0 executablesOlle Jonsson
This gem exposes no executables. https://github.com/ruby/pathname/commit/c401d97d58
2021-04-27test/ruby/test_exception.rb: suppress "warning: statement not reached"Yusuke Endoh
2021-04-27Make imemo_ast WB-protected againYusuke Endoh
by firing the write barrier of imemo_ast after nd_lit is modified. This will fix the issue of https://github.com/ruby/ruby/pull/4416 more gracefully. Notes: Merged: https://github.com/ruby/ruby/pull/4419
2021-04-27Partially revert 2c7d3b3a722c4636ab1e9d289cbca47ddd168d3eYusuke Endoh
to make imemo_ast WB-protected again. Only the test is kept. Notes: Merged: https://github.com/ruby/ruby/pull/4419
2021-04-26Fix type-o in insns.defebrohman
"redefine" -> "redefined" Notes: Merged: https://github.com/ruby/ruby/pull/4418
2021-04-26Fix compiler warnings in objspace_dump.c when assertions are turned onPeter Zhu
Example: ``` In file included from ../../../include/ruby/defines.h:72, from ../../../include/ruby/ruby.h:23, from ../../../gc.h:3, from ../../../ext/objspace/objspace_dump.c:15: ../../../ext/objspace/objspace_dump.c: In function ‘dump_append_ld’: ../../../ext/objspace/objspace_dump.c:95:26: warning: comparison of integer expressions of different signedness: ‘long unsigned int’ and ‘int’ [-Wsign-compare] 95 | RUBY_ASSERT(required <= width); | ^~ ``` Notes: Merged: https://github.com/ruby/ruby/pull/4417