aboutsummaryrefslogtreecommitdiffstats
path: root/ext
Commit message (Collapse)AuthorAgeFilesLines
* Make sure the correct error is raised for EAI_SYSTEM resolver failKJ Tsanaktsidis2024-01-221-6/+19
| | | | | | | | | | | | | In case of EAI_SYSTEM, getaddrinfo is supposed to set more detail in errno; however, because we call getaddrinfo on a thread now, and errno is threadlocal, that information is being lost. Instead, we just raise whatever errno happens to be on the calling thread (which can be something very confusing, like `ECHILD`). Fix it by explicitly propagating errno back to the calling thread through the getaddrinfo_arg structure. [Bug #20198]
* [ruby/nkf] Bump up version to 0.2.0Hiroshi SHIBATA2024-01-221-1/+1
| | | | https://github.com/ruby/nkf/commit/65506fecfd
* [ruby/nkf] Drop GPL and add licenses to gemspecCharles Oliver Nutter2024-01-221-1/+1
| | | | https://github.com/ruby/nkf/commit/19df7138f7
* [ruby/nkf] Add JRuby extension to the gemCharles Oliver Nutter2024-01-221-3/+11
| | | | | | | | | | | This pulls in the nkf extension implementation from JRuby. The build and load logic has been updated along the same lines as ruby/digest and the gem appears to build correctly for the -java platform. Fixes https://github.com/ruby/nkf/pull/13 https://github.com/ruby/nkf/commit/18f57f36ed
* Remove null checks for xfreePeter Zhu2024-01-191-2/+2
| | | | xfree can handle null values, so we don't need to check it.
* [ruby/strscan] Bump versionSutou Kouhei2024-01-191-1/+1
| | | | https://github.com/ruby/strscan/commit/d6f97ec102
* Mark asan fake stacks during machine stack markingKJ Tsanaktsidis2024-01-193-0/+17
| | | | | | | | ASAN leaves a pointer to the fake frame on the stack; we can use the __asan_addr_is_in_fake_stack API to work out the extent of the fake stack and thus mark any VALUEs contained therein. [Bug #20001]
* [ruby/psych] Add :stringify_names option to convert symbol keys to string ↵Robert Schulze2024-01-182-2/+17
| | | | | | for dumping https://github.com/ruby/psych/commit/3d051d89aa
* [ruby/stringio] Fix ascii_only? flag in strio_writetomoya ishida2024-01-181-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://github.com/ruby/stringio/pull/77) Followup of #79 `rb_str_resize()` was changed by https://github.com/ruby/ruby/commit/b0b9f7201acab05c2a3ad92c3043a1f01df3e17f . ```c rb_str_resize(string, shorter) // clear ENC_CODERANGE in some case rb_str_resize(string, longer) // does not clear ENC_CODERANGE anymore ``` ```c // rb_str_resize in string.c if (slen > len && ENC_CODERANGE(str) != ENC_CODERANGE_7BIT) { ENC_CODERANGE_CLEAR(str); } ``` I think this change is based on an assumption that appending null bytes will not change flag `ascii_only?`. `strio_extend()` will make the string longer if needed, and update the flags correctly for appending null bytes. Before `memmove()`, we need to `rb_str_modify()` because updated flags are not updated for `memmove()`. https://github.com/ruby/stringio/commit/b31a538576
* [ruby/io-console] Bump up version to 0.7.2Hiroshi SHIBATA2024-01-181-1/+1
| | | | https://github.com/ruby/io-console/commit/1f2877a185
* Extract bigdecimal as bundled gemsHiroshi SHIBATA2024-01-1820-13258/+0
|
* [ruby/openssl] Add support for IO#timeout.Samuel Williams2024-01-173-2/+24
| | | | | | | | (https://github.com/ruby/openssl/pull/714) * Add support for IO#timeout. https://github.com/ruby/openssl/commit/3bbf5178a9
* [ruby/openssl] Only set min_version on OpenSSL < 1.1.0Ewoud Kohl van Wijngaarden2024-01-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Both Red Hat and Debian-like systems configure the minimum TLS version to be 1.2 by default, but allow users to change this via configs. On Red Hat and derivatives this happens via crypto-policies[1], which in writes settings in /etc/crypto-policies/back-ends/opensslcnf.config. Most notably, it sets TLS.MinProtocol there. For Debian there's MinProtocol in /etc/ssl/openssl.cnf. Both default to TLSv1.2, which is considered a secure default. In constrast, the SSLContext has a hard coded OpenSSL::SSL::TLS1_VERSION for min_version. TLS 1.0 and 1.1 are considered insecure. By always setting this in the default parameters, the system wide default can't be respected, even if a developer wants to. This takes the approach that's also done for ciphers: it's only set for OpenSSL < 1.1.0. [1]: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/security_hardening/using-the-system-wide-cryptographic-policies_security-hardening https://github.com/ruby/openssl/commit/ae215a47ae
* [ruby/psych] Provide a 'Changelog' link on rubygems.org/gems/psychMark Young2024-01-171-1/+1
| | | | | | | | | | | By providing a 'changelog_uri' in the metadata of the gemspec a 'Changelog' link will be shown on https://rubygems.org/gems/psych which makes it quick and easy for someone to check on the changes introduced with a new version. Details of this functionality can be found on https://guides.rubygems.org/specification-reference/ https://github.com/ruby/psych/commit/28ef10edcf
* [ruby/psych] issue #443: quote Y and N when dumpingColin Kelley2024-01-171-1/+1
| | | | https://github.com/ruby/psych/commit/93c8fb443a
* [ruby/stringio] Update the coderange after overwriteNobuyoshi Nakada2024-01-161-0/+6
| | | | | | Fix https://bugs.ruby-lang.org/issues/20185 https://github.com/ruby/stringio/commit/8230552a46
* [ruby/strscan] StringScanner#captures: Return nil not "" forNAITOH Jun2024-01-141-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | unmached capture (https://github.com/ruby/strscan/pull/72) fix https://github.com/ruby/strscan/issues/70 If there is no substring matching the group (s[3]), the behavior is different. If there is no substring matching the group, the corresponding element (s[3]) should be nil. ``` s = StringScanner.new('foobarbaz') #=> #<StringScanner 0/9 @ "fooba..."> s.scan /(foo)(bar)(BAZ)?/ #=> "foobar" s[0] #=> "foobar" s[1] #=> "foo" s[2] #=> "bar" s[3] #=> nil s.captures #=> ["foo", "bar", ""] s.captures.compact #=> ["foo", "bar", ""] ``` ``` s = StringScanner.new('foobarbaz') #=> #<StringScanner 0/9 @ "fooba..."> s.scan /(foo)(bar)(BAZ)?/ #=> "foobar" s[0] #=> "foobar" s[1] #=> "foo" s[2] #=> "bar" s[3] #=> nil s.captures #=> ["foo", "bar", nil] s.captures.compact #=> ["foo", "bar"] ``` https://docs.ruby-lang.org/ja/latest/method/MatchData/i/captures.html ``` /(foo)(bar)(BAZ)?/ =~ "foobarbaz" #=> 0 $~.to_a #=> ["foobar", "foo", "bar", nil] $~.captures #=> ["foo", "bar", nil] $~.captures.compact #=> ["foo", "bar"] ``` * StringScanner#captures is not yet documented. https://docs.ruby-lang.org/ja/latest/class/StringScanner.html https://github.com/ruby/strscan/commit/1fbfdd3c6f
* [ruby/openssl] Add support for `gets(chomp: true)`.Samuel Williams2024-01-131-2/+6
| | | | https://github.com/ruby/openssl/commit/8aa3849cff
* [ruby/openssl] Add more methods to `SocketForwarder`.Samuel Williams2024-01-131-0/+28
| | | | https://github.com/ruby/openssl/commit/39eaa9f677
* Statically allocate parser configyui-knk2024-01-121-17/+8
|
* Revert "Mark asan fake stacks during machine stack marking"KJ Tsanaktsidis2024-01-123-17/+0
| | | | This reverts commit d10bc3a2b8300cffc383e10c3730871e851be24c.
* Mark asan fake stacks during machine stack markingKJ Tsanaktsidis2024-01-123-0/+17
| | | | | | | | ASAN leaves a pointer to the fake frame on the stack; we can use the __asan_addr_is_in_fake_stack API to work out the extent of the fake stack and thus mark any VALUEs contained therein. [Bug #20001]
* Remove setaffinity of pthread for getaddrinfoYusuke Endoh2024-01-112-46/+4
| | | | | | | | | | It looks like `sched_getcpu(3)` returns a strange number on some (virtual?) environments. I decided to remove the setaffinity mechanism because the performance does not appear to degrade on a quick benchmark even if removed. [Bug #20172]
* Fix CRLF -> LF conversion on read for rb_io_fdopen & rb_file_openKJ Tsanaktsidis2024-01-102-0/+244
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When opening a file with `File.open`, and then setting the encoding with `IO#set_encoding`, it still correctly performs CRLF -> LF conversion on Windows when reading files with a CRLF line ending in them (in text mode). However, the file is opened instead with either the `rb_io_fdopen` or `rb_file_open` APIs from C, the CRLF conversion is _NOT_ set up correctly; it works if the encoding is not specified, but if `IO#set_encoding` is called, the conversion stops happening. This seems to be because the encflags never get ECONV_DEFAULT_NEWLINE_DECORATOR set in these codepaths. Concretely, this means that the conversion doesn't happen in the following circumstances: * When loading ruby files with require (that calls rb_io_fdopen) * When parsing ruuby files with RubyVM::AbstractSyntaxTree (that calls rb_file_open). This then causes the ErrorHighlight tests to fail on windows if git has checked them out with CRLF line endings - the error messages it's testing wind up with literal \r\n sequences in them because the iseq text from the parser contains un-newline-converted strings. This commit fixes the problem by copy-pasting the relevant snippet which sets this up in `rb_io_extract_modeenc` (for the File.open path) into the relevant codepaths for `rb_io_fdopen` and `rb_file_open`. [Bug #20101]
* Introduce Numeric Node'sS-H-GAMELINKS2024-01-071-0/+9
|
* Free pthread_attr after setting up the threadAdam Hess2024-01-051-1/+11
| | | | [bug #20149]
* [ruby/erb] Skip building a native extension for JRubyTakashi Kokubun2024-01-041-1/+2
| | | | https://github.com/ruby/erb/commit/f0f68baf6b
* [ruby/io-console] `IO_CONSOLE_VERSION` is no longer a macroNobuyoshi Nakada2024-01-031-1/+1
| | | | https://github.com/ruby/io-console/commit/14b35217dc
* [ruby/io-console] Define IO::ConsoleMode::VERSION from console.cima1zumi2024-01-023-7/+13
| | | | https://github.com/ruby/io-console/commit/6302a2082c
* [ruby/win32ole] [DOC] Fix indentNobuyoshi Nakada2023-12-311-12/+12
| | | | https://github.com/ruby/win32ole/commit/76acc979bf
* [ruby/win32ole] [DOC] Remove useless comment that is mixed into RDocNobuyoshi Nakada2023-12-311-1/+0
| | | | https://github.com/ruby/win32ole/commit/afceb6814f
* [ruby/win32ole] [DOC] Add .document filesNobuyoshi Nakada2023-12-311-0/+1
| | | | https://github.com/ruby/win32ole/commit/eba2934177
* Verify that events2table.c was generated successfullyNobuyoshi Nakada2023-12-282-0/+4
|
* Fix memory overread in registry.rbKJ Tsanaktsidis2023-12-281-5/+2
| | | | | | | | | | | The terminator is not actually getting filled in; we're simply passing (two) bytes of empty memory as the NUL terminator. This can lead to garbage characters getting written to registry values. Fix this by explicitly putting a WCHAR_NUL character into the string to be sent to the registry API, like we do in the MULTI_SZ case. [Bug #20096]
* [ruby/pathname] require fileutils in both methods using itIvan Kuchin2023-12-281-2/+1
| | | | | | | rmtree is already requiring fileutils, but mkpath apparently relies on autoload of FileUtils. Switch to require for both methods https://github.com/ruby/pathname/commit/07ad1fb41a
* [ruby/etc] [DOC] Add minimal documents for constantsNobuyoshi Nakada2023-12-272-0/+17
| | | | https://github.com/ruby/etc/commit/97a4f798d4
* [ruby/etc] [DOC] Improve Etc documentsNobuyoshi Nakada2023-12-271-35/+70
| | | | https://github.com/ruby/etc/commit/fae932ff61
* [flori/json] Use rb_sym2str instead of SYM2IDJohn Hawthorn2023-12-251-1/+1
| | | | | | | | | This avoids pinning an id to the symbol used if a dynamic symbol is passed in as a hash key. rb_sym2str is available in Ruby 2.2+ and json depends on >= 2.3. https://github.com/flori/json/commit/5cbafb8dbe
* [ruby/io-console] Provide a 'Changelog' link on rubygems.org/gems/io-consoleMark Young2023-12-251-0/+1
| | | | | | | | | | | By providing a 'changelog_uri' in the metadata of the gemspec a 'Changelog' link will be shown on https://rubygems.org/gems/io-console which makes it quick and easy for someone to check on the changes introduced with a new version. Details of this functionality can be found on https://guides.rubygems.org/specification-reference/ https://github.com/ruby/io-console/commit/6bacdbf0e1
* [ruby/io-console] bump up to 0.7.2.dev.1Nobuyoshi Nakada2023-12-251-1/+1
| | | | https://github.com/ruby/io-console/commit/08e41a3e4d
* [ruby/io-console] [DOC] Add missing documentsNobuyoshi Nakada2023-12-251-0/+138
| | | | https://github.com/ruby/io-console/commit/44dce34569
* [ruby/io-console] Extract CSI sequenceNobuyoshi Nakada2023-12-251-7/+9
| | | | https://github.com/ruby/io-console/commit/63dbeeecf4
* [ruby/psych] Remove now-unreachable rescue blockAlexander Momchilov2023-12-251-2/+0
| | | | https://github.com/ruby/psych/commit/6905a2123c
* [ruby/psych] Remove unused arrayAlexander Momchilov2023-12-251-2/+0
| | | | https://github.com/ruby/psych/commit/b9e7b4a4a4
* [ruby/fiddle] Bump versionSutou Kouhei2023-12-251-1/+1
| | | | https://github.com/ruby/fiddle/commit/fd4bb4ea8a
* [ruby/date] Provide a 'Changelog' link on rubygems.org/gems/dateMark Young2023-12-251-0/+2
| | | | | | | | | | | By providing a 'changelog_uri' in the metadata of the gemspec a 'Changelog' link will be shown on https://rubygems.org/gems/date which makes it quick and easy for someone to check on the changes introduced with a new version. Details of this functionality can be found on https://guides.rubygems.org/specification-reference/ https://github.com/ruby/date/commit/2dea4c011d
* [ruby/etc] [DOC] Move rdoc files to .documnetNobuyoshi Nakada2023-12-251-0/+1
| | | | https://github.com/ruby/etc/commit/44425427ab
* [ruby/etc] [DOC] Missing constantNobuyoshi Nakada2023-12-251-0/+1
| | | | https://github.com/ruby/etc/commit/a39e982129
* Revert "Rollback to released version numbers of stringio and strscan"Hiroshi SHIBATA2023-12-252-2/+2
| | | | This reverts commit 6a79e53823e328281b9e9eee53cd141af28f8548.
* [ruby/psych] Bump up 5.1.2Hiroshi SHIBATA2023-12-191-1/+1
| | | | https://github.com/ruby/psych/commit/a9ab74d132