AgeCommit message (Collapse)Author
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
2021-04-28[ruby/ostruct] Compatibility with Ruby 2.5Marc-Andre Lafortune
2021-04-28[ruby/optparse] Add EditorConfig fileAlexander Popov
More info here: For example, `ruby/ruby` has it: Also fix some offenses.
2021-04-28[ruby/net-imap] Fix typo intentionaly -> intentionally [ci skip]Ryuta Kamizono
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
2021-04-28[ruby/net-http] Fix the regexp used to clean the hostJean Boussier
Introduced in `/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.
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: - - -
2021-04-28[ruby/net-http] Replace Timeout.timeout in Net:HTTP#connectmohamed
Use Socket.tcp's connect_timeout option instead
2021-04-28[ruby/net-smtp] mod: bump to a new VERSION that could be checked for ↵Tom Freudenberg
testings >0.2.1
2021-04-28[ruby/net-smtp] Removed needless files from Gem::Specification#filesHiroshi SHIBATA
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
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 })`.
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).
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. ``` [ 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:
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:
2021-04-27lldb: Add Freelist Index to dump_page outputMatt Valentine-House
Notes: Merged:
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.
2021-04-27[ruby/net-ftp] Add test casesShugo Maeda
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.
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
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).
2021-04-27[ruby/net-ftp] Re-apply 827e471d438fdec1ae329afb5912b8e06d534823Hiroshi SHIBATA
2021-04-27[ruby/matrix] Guard for < Ruby 3.0Hiroshi SHIBATA
2021-04-27[ruby/matrix] v0.4.1Marc-Andre Lafortune
2021-04-27[ruby/matrix] v0.4.0Marc-Andre Lafortune
2021-04-27[ruby/matrix] Use Gemfile instead of ↵Hiroshi SHIBATA
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: Fixes
2021-04-27[ruby/pathname] gemspec: Explicitly list 0 executablesOlle Jonsson
This gem exposes no executables.
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 more gracefully. Notes: Merged:
2021-04-27Partially revert 2c7d3b3a722c4636ab1e9d289cbca47ddd168d3eYusuke Endoh
to make imemo_ast WB-protected again. Only the test is kept. Notes: Merged:
2021-04-26Fix type-o in insns.defebrohman
"redefine" -> "redefined" Notes: Merged:
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:
2021-04-27* 2021-04-27 [ci skip]git
2021-04-26Document binding behavior for C call/return events for TracePoint/set_trace_funcJeremy Evans
C methods do not have bindings, so binding returns the binding of the nearest C method. Fixes [Bug #9009]
2021-04-26Revert "disable shareable_constant_value for CI"Yusuke Endoh
This reverts commit c647205c3eb1f17409a859149bb7d2ea38b43bed. Maybe the root issue was fixed by 7ac078e5b67ba752a755d6bd9c3a99999767fd3a Notes: Merged:
2021-04-26node.c (rb_ast_new): imemo_ast is WB-unprotectedYusuke Endoh
Previously imemo_ast was handled as WB-protected which caused a segfault of the following code: # shareable_constant_value: literal M0 = {} M1 = {} ... M100000 = {} My analysis is here: `shareable_constant_value: literal` creates many Hash instances during parsing, and add them to node_buffer of imemo_ast. However, the contents are missed because imemo_ast is incorrectly WB-protected. This changeset makes imemo_ast as WB-unprotected. Notes: Merged:
2021-04-26[ruby/irb] Added setup and teardown to TestIRB::TestInitNobuyoshi Nakada
Not to be affected by existing rc files in all tests.
2021-04-26[ruby/irb] Added `colorable` keyword optionNobuyoshi Nakada
Currently `IRB::Color.colorize` and `IRB::Color.colorize_code` refer `$stdin.tty?` internally. This patch adds `colorable` keyword option which overrides it.
2021-04-26[ruby/irb] Assertions on non-ttyNobuyoshi Nakada
2021-04-26[ruby/irb] Added test_colorizeNobuyoshi Nakada
2021-04-26[ruby/irb] Added assert_equal_with_termNobuyoshi Nakada
2021-04-26[ruby/irb] Fix typo ture -> true [ci skip]Ryuta Kamizono
2021-04-26disable shareable_constant_value for CIKoichi Sasada
To debug CI failures on FreeBSD, disable `shareable_constant_value`.