summaryrefslogtreecommitdiff
path: root/ext
AgeCommit message (Collapse)Author
2025-11-30merge revision(s) beb85e7eeee4163cd45b69645a60cdb942f72c05: [Backport #21705]nagachika
[PATCH] [Bug #21705] Fix segfaults on Windows It should check the type of the argument and coercion before converting the encoding.
2025-11-02merge revision(s) 12350eb9e0d3317da57b5a37c0c2810946b48850: [Backport #21625]nagachika
[PATCH] [Bug #21625] Allow io/wait methods with `IO#ungetc` in text mode
2025-10-11Update openssl gem to 3.2.2Bo Anderson
2025-10-08merge revision(s) 43dbb9a93f4de3f1170d7d18641c30e81cc08365, ↵nagachika
2bb6fe3854e2a4854bb89bfce4eaaea9d848fd1b, 7c9dd0ecff61153b96473c6c51d5582e809da489: [Backport #21629] [PATCH] [Bug #21629] Enable `nonstring` attribute on clang 21 [PATCH] [Bug #21629] Initialize `struct RString` [PATCH] [Bug #21629] Initialize `struct RArray`
2025-07-24Revert bump versions of default gems for extconf.rb changes.nagachika
This reverts commit 91263c7e523dd0345c35ac4b616676132aad09d1.
2025-07-20[ruby/json] Run `have_func` with the header providing the declarationsNobuyoshi Nakada
https://github.com/ruby/json/commit/95fb084027
2025-07-20[ruby/strscan] Run `have_func` with the header providing the declarationsNobuyoshi Nakada
https://github.com/ruby/strscan/commit/18c0a59b65
2025-07-20[ruby/strscan] Update extconf.rbNobuyoshi Nakada
(https://github.com/ruby/strscan/pull/158) - `have_func` includes "ruby.h" by default. - include "ruby/re.h" where `rb_reg_onig_match` is declared. https://github.com/ruby/strscan/commit/1ac96f47e9
2025-07-20[ruby/openssl] Run `have_func` with the header providing the declarationsNobuyoshi Nakada
https://github.com/ruby/openssl/commit/b6f56c4540
2025-07-20Bump io-nonblock to 0.3.0.1nagachika
2025-07-20[ruby/io-nonblock] Run `have_func` with the header providing the declarationsNobuyoshi Nakada
https://github.com/ruby/io-nonblock/commit/70909f5362
2025-07-20Bump io-wait to 0.3.1.1nagachika
2025-07-20[ruby/io-wait] Run `have_func` with the header providing the declarationsNobuyoshi Nakada
https://github.com/ruby/io-wait/commit/48309d7877
2025-07-20Bump io-console to 0.7.1.1nagachika
2025-07-20[ruby/io-console] Run `have_func` with the header providing the declarationsNobuyoshi Nakada
https://github.com/ruby/io-console/commit/dd013030dd
2025-07-20bump etc-1.4.3.1nagachika
2025-07-20[ruby/etc] Run `have_func` with the header providing the declarationsNobuyoshi Nakada
https://github.com/ruby/etc/commit/6668bfd42a
2025-07-20merge revision(s) d77e02bd85ab7f841df8d473bac214b9a92a3506: [Backport #21497]nagachika
[Bug #21497] [ruby/socket]: add full prototype MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit otherwise, gcc 15 will complain: > init.c:573:19: error: too many arguments to function ‘Rconnect’; expected 0, have 3 > 573 | return (VALUE)Rconnect(arg->fd, arg->sockaddr, arg->len); > | ^~~~~~~~ ~~~~~~~ > In file included from init.c:11: > rubysocket.h:294:5: note: declared here > 294 | int Rconnect(); > | ^~~~~~~~ > sockssocket.c:33:9: error: too many arguments to function ‘SOCKSinit’; expected 0, have 1 > 33 | SOCKSinit("ruby"); > | ^~~~~~~~~ ~~~~~~ > In file included from sockssocket.c:11: > rubysocket.h:293:6: note: declared here > 293 | void SOCKSinit(); > | ^~~~~~~~~ Signed-off-by: Z. Liu <zhixu.liu@gmail.com>
2025-06-29merge revision(s) c1877d431e76f4a782d51602fa8487e98d302956: [Backport #21437]nagachika
[ruby/date] [Bug #21437] Date#hash for large years Addresses https://bugs.ruby-lang.org/issues/21437 Signed-off-by: Dmitry Dygalo <dmitry.dygalo@workato.com> https://github.com/ruby/date/commit/31f07bc576
2025-03-16merge revision(s) 2b6fc9ea7212543a1be26768403f59c7a759b5ea: [Backport #21092]nagachika
[Bug #21092] Fallback variables after execonf has done When reading from a dummy makefile, the global variables initialized in `init_mkmf` may not be overridden.
2024-11-12ObjectSpace.dump: handle Module#set_temporary_name (#12068)Jean byroot Boussier
ObjectSpace.dump: handle Module#set_temporary_name [Bug #20892] Until the introduction of that method, it was impossible for a Module name not to be valid JSON, hence it wasn't going through the slower escaping function. This assumption no longer hold. Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
2024-11-04merge revision(s) 0d16c36d0ab2afa2ec79b72b229e69c141ebdaba: [Backport #13831]Jonathan Calvert
[win32/registry] Fallback to UTF-8 for unknown codepages There are some codepages like cp708 for which no ruby encoding exists: $ ruby -e "Encoding.find('cp708')" Traceback (most recent call last): 1: from -e:1:in `<main>' -e:1:in `find': unknown encoding name - cp708 (ArgumentError) win32/registry uses ENCODING to transcode error messages and expand environment variables from UTF-16LE, so using UTF-8 seems like the best choice and is better than a hard failure. This should resolve [Bug #13831]
2024-09-04Merge JSON 2.7.2 for Ruby 3.3 (#11541)Hiroshi SHIBATA
Merge JSON 2.7.2
2024-09-02merge revision(s) 97449338d6cb42d9dd7c9ca61550616e7e6b6ef6: [Backport #20649]Takashi Kokubun
[Bug #20649] Allow `nil` as 2nd argument of `assign_error` Fallback to the last token element in that case, for the backward compatibilities.
2024-07-09retry on cancelling of `getaddrinfo` (#11131)Koichi Sasada
When the registerred unblock function is called, it should retry the cancelled blocking function if possible after checkints. For example, `SIGCHLD` can cancel this method, but it should not raise any exception if there is no trap handlers. The following is repro-code: ```ruby require 'socket' PN = 10_000 1000000.times{ p _1 PN.times{ fork{ sleep rand(0.3) } } i = 0 while i<PN cpid = Process.wait -1, Process::WNOHANG if cpid # p [i, cpid] i += 1 end begin TCPServer.new(nil, 0).close rescue p $! exit! end end } ```
2024-07-08merge revision(s) fba8aff7, d8c6e91748871ab2287d7703347847fe18a292d2: ↵Takashi Kokubun
[Backport #20592] [Bug #20592] Fix segfault when sending NULL to freeaddrinfo On alpine freeaddrinfo does not accept NULL pointer Fix dangling `else`
2024-06-04merge revision(s) f54369830f83a65fb54916d762883fbe6eeb7d0b, ↵Takashi Kokubun
338eb0065bd81ba8ae8b9402abc94804a24594cc, ac636f5709feb1d9d7a0c46a86be153be765cf21: [Backport #20516] Revert "Rollback to released version numbers of stringio and strscan" This reverts commit 6a79e53823e328281b9e9eee53cd141af28f8548. [ruby/strscan] StringScanner#captures: Return nil not "" for 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/strscan] Bump version https://github.com/ruby/strscan/commit/d6f97ec102
2024-05-29[ruby/zlib] Bump up 3.1.1Takashi Kokubun
2024-05-29merge revision(s) 9f8f32bf9f3758ba67dd2afe7e07d9eccb68bbc7: [Backport #20289]Takashi Kokubun
[ruby/zlib] In Zlib::GzipReader#eof? check if we're actually at eof Only consider it eof if we read ahead and something fills the buf. If not, we may only have empty blocks and the footer. Fixes https://github.com/ruby/zlib/pull/56 https://github.com/ruby/zlib/commit/437bea8003
2024-05-29merge revision(s) 7e4b1f8e1935a10df3c41ee60ca0987d73281126: [Backport #20322]Takashi Kokubun
[Bug #20322] Fix rb_enc_interned_str_cstr null encoding The documentation for `rb_enc_interned_str_cstr` notes that `enc` can be a null pointer, but this currently causes a segmentation fault when trying to autoload the encoding. This commit fixes the issue by checking for NULL before calling `rb_enc_autoload`.
2024-05-29Initialize errno variables and fix maybe-uninitialized warningsNobuyoshi Nakada
2024-03-21merge revision(s) ae8990aef098410ecc2b5f48fea9d7d171a3c5f6: [Backport ↵NARUSE, Yui
#20183] (#10310) Alias init functions The extension library has each initialization function named "Init_" + basename. If multiple extensions have the same base name (such as cgi/escape and erb/escape), the same function will be registered for both names. To fix this conflict, rename the initialization functions under sub directories using using parent names, when statically linking.
2024-03-14[Bug #20208] Revert "Set AI_ADDRCONFIG when making getaddrinfo(3) calls for ↵KJ Tsanaktsidis
outgoi… (#9791) Revert "Set AI_ADDRCONFIG when making getaddrinfo(3) calls for outgoing conns" This reverts commit 673ed41c81cf5a6951bcb2c3dec82d7bd6ea7440.
2024-03-14merge revision(s) 6c0e58a54e3fda604386d9c409e2a9998bbc9352: [Backport ↵NARUSE, Yui
#20198] (#10252) Make sure the correct error is raised for EAI_SYSTEM resolver fail 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] --- ext/socket/raddrinfo.c | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-)
2024-03-04merge revision(s) 051a874325c177e040301878069c2b28f5d06ce6: [Backport #20096]NARUSE, Yui
Fix memory overread in registry.rb 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] --- ext/win32/lib/win32/registry.rb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
2024-02-03merge revision(s) 1bd98c820da46a05328d2d53b8f748f28e7ee8f7: [Backport ↵NARUSE, Yui
#20172] (#9798) Remove setaffinity of pthread for getaddrinfo 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] --- ext/socket/extconf.rb | 2 -- ext/socket/raddrinfo.c | 48 ++++-------------------------------------------- 2 files changed, 4 insertions(+), 46 deletions(-)
2024-02-01merge revision(s) 6aacbd690ccde53f9b97c6673482cb11df3f2955: [Backport #20149]NARUSE, Yui
Free pthread_attr after setting up the thread [bug #20149] --- ext/socket/raddrinfo.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
2023-12-19[ruby/psych] Bump up 5.1.2Hiroshi SHIBATA
https://github.com/ruby/psych/commit/a9ab74d132
2023-12-19[ruby/psych] Use `compare_by_identity` instead of `object_id`Alexander Momchilov
Object IDs became more expensive in Ruby 2.7. Using `Hash#compare_by_identity` let's us get the same effect, without needing to force all these objects to have object_ids assigned to them. https://github.com/ruby/psych/commit/df69e4a12e
2023-12-18Update `BasicSocket#recv` documentation on return valueJean Boussier
Ref: https://github.com/ruby/ruby/pull/6407 [Bug #19012] `0` is now interpreted as closed connection an not an empty packet, as these are very rare and pretty much useless.
2023-12-18[DOC] Show `PTY.getpty` as an alias of `PTY.spawn`Nobuyoshi Nakada
`:nodoc:` directive does not work at method definition in C, and must be at the implementation function. That is, there is no way to make one method visible and another method sharing the implementation invisible at the same time.
2023-12-18[DOC] Add Socket::ResolutionError documentationNobuyoshi Nakada
2023-12-18[DOC] Correct the location of Addrinfo documentNobuyoshi Nakada
The document must be placed immediately before the class definition. No other statements can be placed in between.
2023-12-18[DOC] Stop unintentional references to builtin or standard namesNobuyoshi Nakada
2023-12-17Revert "[DOC] Make undocumented socket constans nodoc"Nobuyoshi Nakada
This reverts commit cbda94edd80b0f664eda927f9ce9405b2074633a, because `:nodoc:` does not work for constants. In the case of `rb_define_const`, RDoc parses the preceeding comment as in `"/* definition: comment */"` form.
2023-12-17[DOC] Make undocumented socket constans nodocNobuyoshi Nakada
2023-12-17[DOC] Utilize COMMENTS.default_proc to add fallback documentsNobuyoshi Nakada
2023-12-16[ruby/io-console] Bump up v0.7.1Hiroshi SHIBATA
https://github.com/ruby/io-console/commit/8ac766d870
2023-12-16[ruby/syslog] Bump up v0.1.2Hiroshi SHIBATA
https://github.com/ruby/syslog/commit/f7b29e2199
2023-12-16Rollback to released version numbers of stringio and strscanHiroshi SHIBATA