| Age | Commit message (Collapse) | Author |
|
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
|
|
https://github.com/ruby/json/commit/dd9c46c805
Notes:
Merged: https://github.com/ruby/ruby/pull/12598
|
|
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
|
|
https://github.com/ruby/json/commit/591056a526
Notes:
Merged: https://github.com/ruby/ruby/pull/12598
|
|
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
|
|
https://github.com/ruby/psych/commit/2af9f6ac02
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12583
|
|
Fixes ruby/psych#689
https://github.com/ruby/psych/commit/ac887cdc76
|
|
https://github.com/ruby/psych/commit/2f46abf4e1
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12578
|
|
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
|
|
LibreSSL
LibreSSL 2.7.0 added support for OPENSSL_init_ssl() and
OpenSSL_version().
https://github.com/ruby/openssl/commit/1328415097
|
|
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
|
|
https://github.com/ruby/openssl/commit/28f2901c48
|
|
[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
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12556
|
|
Ref: https://github.com/ruby/json/pull/728
Ref: https://github.com/ruby/ruby/pull/12569
https://github.com/ruby/json/commit/30a4a86954
|
|
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>
|
|
Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
Notes:
Merged: https://github.com/ruby/ruby/pull/12568
|
|
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
|
|
```
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
|
|
|
|
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
|
|
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
```
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12488
|
|
Signed-off-by: Raul Gutierrez Segales <rgs@itevenworks.net>
Notes:
Merged: https://github.com/ruby/ruby/pull/12506
|
|
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>
|
|
`cmd.exe` built-in `cd` does not recognize slashes as path separators,
replace to backslashes.
Notes:
Merged: https://github.com/ruby/ruby/pull/12481
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12481
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12469
|
|
https://github.com/ruby/date/commit/904d4b9607
Notes:
Merged: https://github.com/ruby/ruby/pull/12469
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12467
|
|
`:nodoc:` seems not working for inner classes.
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12460
|
|
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>
|
|
Also, a topic about Socket::ResolutionError is added to NEWS
Notes:
Merged-By: shioimm <shioi.mm@gmail.com>
|
|
to prevent the following scenario:
1. `delete_unique_str()` can be called while GC (sweeping)
2. it calls `st_insert()` to decrement the counter
3. `st_insert()` can try to extend the table even if the key exists
4. `xmalloc` while GC and cause BUG
Notes:
Merged: https://github.com/ruby/ruby/pull/12407
|
|
https://github.com/ruby/openssl/commit/e5153dbbb4
Notes:
Merged: https://github.com/ruby/ruby/pull/12421
|
|
OpenSSL::Digest#finish overrides Digest::Instance#finish and is called
from the Digest::Class framework in the digest library. This method is
not supposed to take any arguments, as suggested by the RDoc comment for
Digest::Instance#finish.
It is a private method and not exposed to users. Let's remove it.
This optional parameter exists since r15602 in Ruby trunk, the commit
which converted OpenSSL::Digest to a subclass of Digest::Class.
https://github.com/ruby/openssl/commit/dcb2a4f30b
Notes:
Merged: https://github.com/ruby/ruby/pull/12421
|
|
Likewise, OpenSSL::Digest#finish needs to make the output buffer
independent before writing to it.
https://github.com/ruby/openssl/commit/9cc8a83466
Notes:
Merged: https://github.com/ruby/ruby/pull/12421
|
|
OpenSSL::Cipher#update accepts a String as the second argument to be
used as the output buffer. The buffer must be directly writable, in
other words, it must not be frozen and not a shared string.
rb_str_resize() does not make the String independent if the String
already has the intended length. Use the rb_str_modify() family instead
to check it.
Fixes: https://bugs.ruby-lang.org/issues/20937
https://github.com/ruby/openssl/commit/1de3b80a46
Notes:
Merged: https://github.com/ruby/ruby/pull/12421
|
|
Add a binding for PKCS12_set_mac() to set MAC parameters and
(re-)calculate MAC for the content.
This allows generating PKCS #12 with consistent MAC parameters with
different OpenSSL versions. OpenSSL 3.0 changed the default hash
function used for HMAC and the KDF from SHA-1 to SHA-256.
Fixes: https://github.com/ruby/openssl/issues/772
https://github.com/ruby/openssl/commit/f5ed2a74b6
Notes:
Merged: https://github.com/ruby/ruby/pull/12421
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12385
|
|
https://github.com/ruby/json/commit/f745ec145e
Notes:
Merged: https://github.com/ruby/ruby/pull/12394
|
|
Check for existence of strnlen() and use alternative code if it is missing.
https://github.com/ruby/json/commit/48d4bbc3a0
Notes:
Merged: https://github.com/ruby/ruby/pull/12394
|
|
https://github.com/ruby/psych/commit/746e1ad24d
|
|
Wrap `do_fast_fallback_getaddrinfo` with `rb_thread_prevent_fork`
Referencing PR #10864,
wrap `do_fast_fallback_getaddrinfo` with `rb_thread_prevent_fork`
to avoid fork safety issues.
`do_fast_fallback_getaddrinfo` internally uses getaddrinfo(3),
leading to fork safety issues, as described in PR #10864.
This change ensures that `do_fast_fallback_getaddrinfo`
is guarded by `rb_thread_prevent_fork`,
preventing fork during its execution and avoiding related issues.
Notes:
Merged-By: shioimm <shioi.mm@gmail.com>
|
|
https://github.com/ruby/win32ole/commit/3e9b3b02e9
|
|
When reference updating ObjectSpace.trace_object_allocations, we need to
check whether the object is valid or not because it does not mark the
object so the object may be dead. This can cause a segmentation fault
if the object is on a free heap page.
For example, the following script crashes:
require "objspace"
objs = []
ObjectSpace.trace_object_allocations do
1_000_000.times do
objs << Object.new
end
end
objs = nil
# Free pages that the objs were on
GC.start
# Run compaction and check that it doesn't crash
GC.compact
Notes:
Merged: https://github.com/ruby/ruby/pull/12360
|
|
We need to reinsert into the ST table when an object moves because it is
a numtable that hashes on the object address, so when an object moves we
need to reinsert it rather than just updating the key.
Notes:
Merged: https://github.com/ruby/ruby/pull/12339
|