summaryrefslogtreecommitdiff
path: root/ext
AgeCommit message (Collapse)Author
2025-01-20[ruby/openssl] extconf.rb: remove dir_config("kerberos")Kazuki Yamaguchi
The dir_config was introduced by Ruby trunk r4181. Since support for Kerberos cipher suites has been removed in OpenSSL 1.1.0, it is no longer necessary. Although ruby/openssl did not directly depend on the MIT Kerberos library, it was an optional transitive dependency. Unless it was disabled by a compile-time option, the OpenSSL headers would try to include <krb5.h>. https://github.com/ruby/openssl/commit/78d028c332
2025-01-20[ruby/openssl] Require OpenSSL 1.1.0 or laterKazuki Yamaguchi
Drop support for OpenSSL 1.0.2. It has reached upstream EOL in 2019-12. Most distributions that shipped with OpenSSL 1.0.2 have also reached EOL, or provide a newer version in the package repository: - RHEL 7 (EOL 2024-06) - Ubuntu 16.04 LTS (EOL 2021-04) - Amazon Linux 2 (EOL 2026-06, but OpenSSL 1.1.1 can be installed via the openssl11{,-devel} package) https://github.com/ruby/openssl/commit/38ec6fd50e
2025-01-20[ruby/openssl] pkcs7: remove unnecessary const castKazuki Yamaguchi
PKCS7_encrypt() and PKCS7_SIGNER_INFO_set() take const EVP_CIPHER and EVP_MD at least since OpenSSL 0.9.7. https://github.com/ruby/openssl/commit/9db621a5c0
2025-01-20[ruby/openssl] engine: remove constants for ENGINE_METHOD_BN_MOD_EXP{,_CRT}Kazuki Yamaguchi
These macros do not exist in OpenSSL 0.9.7 or later, which was released in 2002. https://github.com/ruby/openssl/commit/938a1e6aab
2025-01-20[ruby/json] Reject invalid number: `-` `-.1` `-e0`tompng
https://github.com/ruby/json/commit/b9bfeecfa9 Notes: Merged: https://github.com/ruby/ruby/pull/12602
2025-01-20[ruby/json] Raise parse error on invalid commentstompng
https://github.com/ruby/json/commit/2f57f40467 Notes: Merged: https://github.com/ruby/ruby/pull/12602
2025-01-20[ruby/json] Fix parsing incomplete unicode escape "\uaaa"tompng
https://github.com/ruby/json/commit/86c0d4eb7e Notes: Merged: https://github.com/ruby/ruby/pull/12602
2025-01-20[ruby/json] Fix JSON::Fragment#to_json signatureJean Boussier
https://github.com/ruby/json/commit/f8817fe56c Notes: Merged: https://github.com/ruby/ruby/pull/12602
2025-01-20[ruby/json] Introduce JSON::FragmentÉtienne Barrié
https://github.com/ruby/json/commit/9e3500f345 Co-authored-by: Jean Boussier <jean.boussier@gmail.com> Notes: Merged: https://github.com/ruby/ruby/pull/12602
2025-01-20ext/json no longer uses ragelNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/12599
2025-01-20[ruby/json] Fix a regression in the parser with leading /Jean Boussier
Ref: https://github.com/ruby/ruby/pull/12598 This could lead to an infinite loop. https://github.com/ruby/json/commit/f8cfa2696a Notes: Merged: https://github.com/ruby/ruby/pull/12600
2025-01-20Removed parser.rl from ext/json/parser/dependHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/12598
2025-01-20[ruby/json] json_string_unescape: use memchr to search for backslashesJean Boussier
https://github.com/ruby/json/commit/5e6cfcf724 Notes: Merged: https://github.com/ruby/ruby/pull/12598
2025-01-20[ruby/json] Cleanup json_decode_floatJean Boussier
Move all the decimal_class option parsing in the constructor. https://github.com/ruby/json/commit/e9adefdc38 Notes: Merged: https://github.com/ruby/ruby/pull/12598
2025-01-20[ruby/json] parser.c: Pass the JSON_ParserConfig pointerJean Boussier
Doesn't make a measurable performance difference but is a bit clearer. https://github.com/ruby/json/commit/314d117c61 Notes: Merged: https://github.com/ruby/ruby/pull/12598
2025-01-20[ruby/json] Use RSTRING_ENDJean Boussier
https://github.com/ruby/json/commit/dd9c46c805 Notes: Merged: https://github.com/ruby/ruby/pull/12598
2025-01-20[ruby/json] Replace fbuffer by stack buffers or RB_ALLOCV in parser.cJean Boussier
We only use that buffer for parsing integer and floats, these are unlikely to be very big, and if so we can just use RB_ALLOCV as it will almost always end in a small `alloca`. This allow to no longer need `rb_protect` around the parser. https://github.com/ruby/json/commit/994859916a Notes: Merged: https://github.com/ruby/ruby/pull/12598
2025-01-20[ruby/json] Implement write barriers for ParserConfig objectsJean Boussier
https://github.com/ruby/json/commit/591056a526 Notes: Merged: https://github.com/ruby/ruby/pull/12598
2025-01-20Finalize Kevin's handrolled parser.Jean Boussier
And get rid of the Ragel parser. This is 7% faster on activitypub, 15% after on twitter and 11% faster on citm_catalog. There might be some more optimization opportunities, I did a quick optimization pass to fix a regression in string parsing, but other than that I haven't dug much in performance. Notes: Merged: https://github.com/ruby/ruby/pull/12598
2025-01-17[ruby/psych] Bump version for releaseCharles Oliver Nutter
https://github.com/ruby/psych/commit/2af9f6ac02
2025-01-16Migrate win32ole as bundled gemsHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/12583
2025-01-15[ruby/psych] Update to SnakeYAML-Engine 2.9Charles Oliver Nutter
Fixes ruby/psych#689 https://github.com/ruby/psych/commit/ac887cdc76
2025-01-15[ruby/psych] remove vim settingsAaron Patterson
https://github.com/ruby/psych/commit/2f46abf4e1
2025-01-15Link `bin` as well as `lib` so that `Gem.bin_path` worksNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/12578
2025-01-14[ruby/openssl] engine: remove mention of LibreSSL from OpenSSL::EngineKazuki Yamaguchi
These paths are only reachable when it is compiled against OpenSSL. LibreSSL 3.9 does not support ENGINE and defines OPENSSL_NO_ENGINE. https://github.com/ruby/openssl/commit/e153d6ab47
2025-01-14[ruby/openssl] ossl.c: use OPENSSL_init_ssl() and OpenSSL_version() with ↵Kazuki Yamaguchi
LibreSSL LibreSSL 2.7.0 added support for OPENSSL_init_ssl() and OpenSSL_version(). https://github.com/ruby/openssl/commit/1328415097
2025-01-14[ruby/openssl] Require LibreSSL 3.9 or laterKazuki Yamaguchi
Drop support for LibreSSL 3.1-3.8. LibreSSL 3.8 has reached its EOL in 2024-10. https://github.com/ruby/openssl/commit/f33d611f9f
2025-01-14[ruby/openssl] Refactor buffer usage to only use `append_as_bytes`Jean Boussier
https://github.com/ruby/openssl/commit/28f2901c48
2025-01-14[ruby/openssl] Reduce OpenSSL::Buffering#do_write overheadJean Boussier
[Bug #20972] The `rb_str_new_freeze` was added in https://github.com/ruby/openssl/issues/452 to better handle concurrent use of a Socket, but SSL sockets can't be used concurrently AFAIK, so we might as well just error cleanly. By using `rb_str_locktmp` we can ensure attempts at concurrent write will raise an error, be we avoid causing a copy of the bytes. We also use the newer `String#append_as_bytes` method when available to save on some more copies. https://github.com/ruby/openssl/commit/0d8c17aa85 Co-Authored-By: luke.gru@gmail.com
2025-01-14Use LRAMA instead of BISONydah
Notes: Merged: https://github.com/ruby/ruby/pull/12556
2025-01-14[ruby/json] Fix a method redefinition warning in C parserJean Boussier
Ref: https://github.com/ruby/json/pull/728 Ref: https://github.com/ruby/ruby/pull/12569 https://github.com/ruby/json/commit/30a4a86954
2025-01-14[ruby/json] Refactor JSON::Ext::Parser to split configuration and parsing stateJean Boussier
Ref: https://github.com/ruby/json/pull/718 The existing `Parser` interface is pretty bad, as it forces to instantiate a new instance for each document. Instead it's preferable to only take the config and do all the initialization needed, and then keep the parsing state on the stack on in ephemeral memory. This refactor makes the `JSON::Coder` pull request much easier to implement in a performant way. https://github.com/ruby/json/commit/c8d5236a92 Co-Authored-By: Étienne Barrié <etienne.barrie@gmail.com>
2025-01-14Remove Generator::State#_generateÉtienne Barrié
Co-authored-by: Jean Boussier <jean.boussier@gmail.com> Notes: Merged: https://github.com/ruby/ruby/pull/12568
2025-01-14[ruby/fiddle] add regex for bool parsing & test struct w/ boolDmitrii
parsing (https://github.com/ruby/fiddle/pull/169) GitHub: fix https://github.com/ruby/fiddle/pull/168 Struct parsing invokes "parse_ctype" on the whole member signature, which fails if member type is "bool" due to plain string matching for it. This change updates "bool" type matching to a regexp, so TYPE_BOOL is correctly parsed for a whole signature like "bool toggle" as well as just "bool". --------- https://github.com/ruby/fiddle/commit/71607446d4 Co-authored-by: Sutou Kouhei <kou@cozmixng.org> Notes: Merged: https://github.com/ruby/ruby/pull/12568
2025-01-13[ruby/date] Enclose dangling else in braces and fix -Wmisleading-indentationNobuyoshi Nakada
``` date_strptime.c:253:324: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation] 253 | ...((VALUE)RUBY_Qtrue)); return 0; } while (0); si += l; } while (0); | ^ date_strptime.c:252:7: note: previous statement is here 252 | else | ^ ``` https://github.com/ruby/date/commit/41aed5b746
2025-01-13Dependency: ext/-test-/memory_status/dependNobuyoshi Nakada
2025-01-13Stop passing `-t` and `-v` on ripper buildyui-knk
Both of them are debug option. Let's use `YFLAGS` for parse.y build if needed. Notes: Merged: https://github.com/ruby/ruby/pull/12555
2025-01-07Improve lookup tables for string escaping.Jean Boussier
Introduce a simplified table for the most common case, which is `script_safe: false, ascii_only: false`. On the `script_safe` table, now only `0xE2` does a multi-byte check. Merge back `convert_ASCII_to_JSON`, as it no longer help much with the simplified escape table. ``` == Encoding mixed utf8 (5003001 bytes) ruby 3.4.1 (2024-12-25 revision 48d4efcb85) +YJIT +PRISM [arm64-darwin23] Warming up -------------------------------------- after 38.000 i/100ms Calculating ------------------------------------- after 398.220 (± 3.0%) i/s (2.51 ms/i) - 2.014k in 5.061659s Comparison: before: 381.8 i/s after: 398.2 i/s - same-ish: difference falls within error == Encoding mostly utf8 (5001001 bytes) ruby 3.4.1 (2024-12-25 revision 48d4efcb85) +YJIT +PRISM [arm64-darwin23] Warming up -------------------------------------- after 39.000 i/100ms Calculating ------------------------------------- after 393.337 (± 2.5%) i/s (2.54 ms/i) - 1.989k in 5.059397s Comparison: before: 304.3 i/s after: 393.3 i/s - 1.29x faster == Encoding twitter.json (466906 bytes) ruby 3.4.1 (2024-12-25 revision 48d4efcb85) +YJIT +PRISM [arm64-darwin23] Warming up -------------------------------------- after 244.000 i/100ms Calculating ------------------------------------- after 2.436k (± 0.9%) i/s (410.43 μs/i) - 12.200k in 5.007702s Comparison: before: 2125.9 i/s after: 2436.5 i/s - 1.15x faster ```
2025-01-07Remove unused token definitions for `tRPAREN` in Ripper and parser filesydah
Notes: Merged: https://github.com/ruby/ruby/pull/12488
2025-01-06Fix typo for private constant in SocketRaul Gutierrez Segales
Signed-off-by: Raul Gutierrez Segales <rgs@itevenworks.net> Notes: Merged: https://github.com/ruby/ruby/pull/12506
2025-01-02[ruby/stringio] Provide a 'Changelog' link onmark-young-atg
rubygems.org/gems/stringio (https://github.com/ruby/stringio/pull/111) By providing a 'changelog_uri' in the metadata of the gemspec a 'Changelog' link will be shown on https://rubygems.org/gems/stringio 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/#metadata --------- https://github.com/ruby/stringio/commit/8c084bfcdb Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
2024-12-27Win32: Fix sub make commandsNobuyoshi Nakada
`cmd.exe` built-in `cd` does not recognize slashes as path separators, replace to backslashes. Notes: Merged: https://github.com/ruby/ruby/pull/12481
2024-12-27Win32: clean extra object fileNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/12481
2024-12-26Bump up fiddle 1.1.7.dev and stringio 3.1.3.devHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/12469
2024-12-26[ruby/date] Simplify description of this libraryRyan Bigg
https://github.com/ruby/date/commit/904d4b9607 Notes: Merged: https://github.com/ruby/ruby/pull/12469
2024-12-25[DOC] MonitorNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/12467
2024-12-25[DOC] Stop document Ripper::LexerNobuyoshi Nakada
`:nodoc:` seems not working for inner classes.
2024-12-25[DOC] MonitorNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/12460
2024-12-25Introduce a timeout to prevent `rb_thread_fd_select` from hanging with ↵Misaki Shioi
write(2) failure (#12457) Rarely, there are cases where a write(2) call from a child thread to notify the main thread of the completion of name resolution fails. If this happens while the main thread is waiting in `rb_thread_fd_select`, rb_thread_fd_select may not notice that the name resolution has completed and end up hanging. This issue becomes a problem when there are no sockets currently being connected, no addresses ready for immediate connection attempts, and name resolution has already completed for one address family while the main thread is waiting for the name resolution of the other address family. (If name resolution is not completed for either address family, the chances of write(2) failing in both child threads are likely low.) To avoid this issue, a timeout is introduced to rb_thread_fd_select under the above conditions. This way, even if the issue occurs, the completion of name resolution should still be detected in the subsequent `if (!resolution_store.is_all_finished) ...` block. Notes: Merged-By: shioimm <shioi.mm@gmail.com>
2024-12-23Improve doc for `Socket::ResolutionError` (#12434)Misaki Shioi
Also, a topic about Socket::ResolutionError is added to NEWS Notes: Merged-By: shioimm <shioi.mm@gmail.com>