Age | Commit message (Collapse) | Author |
---|
| https://.com/ruby/erb/commit/9152ce8db4 |
| Notes: Merged: https://.com/ruby/ruby/pull/13304 |
| e.g. ``` JSON.dump(1746861937.7842371) ``` master: ``` "1.https://.com/ruby/json/commit/746861937784+9" ``` This branch and older json versions: ``` https://.com/ruby/json/commit/1746861937.7842371 ``` In the end it's shorter, and according to `canada.json` benchmark performance is the same. https://.com/ruby/json/commit/866f72a437 |
| |
| |
| https://.com/ruby/psych/commit/dbf9e36583 |
| https://.com/ruby/psych/commit/336553b412 |
| https://.com/ruby/psych/commit/e954f96639 |
| https://.com/ruby/psych/commit/30a2a5ee94 |
| As well as `RB_OBJ_SHAPE_ID` -> `rb_obj_shape_id` and `RSHAPE` is now a simple alias for `rb_shape_lookup`. I tried to turn all these into `static inline` but I'm having trouble with `RUBY_EXTERN rb_shape_tree_t *rb_shape_tree_ptr;` not being exposed as I'd expect. Notes: Merged: https://.com/ruby/ruby/pull/13283 |
| And `rb_shape_get_shape` -> `RB_OBJ_SHAPE`. Notes: Merged: https://.com/ruby/ruby/pull/13283 |
| Notes: Merged: https://.com/ruby/ruby/pull/13283 |
| As well as `rb_shape_edges_count` and `rb_shape_memsize`. Notes: Merged: https://.com/ruby/ruby/pull/13283 |
| Notes: Merged: https://.com/ruby/ruby/pull/13275 |
| Notes: Merged: https://.com/ruby/ruby/pull/13272 |
| https://.com/ruby/json/commit/3b605d9b1e |
| Use feature testing to detect native Set, and don't rely on `Set#to_h` which wasn't intended as a public method. https://.com/ruby/psych/commit/d58cff11af |
| And get rid of the `obj_to_id_tbl` It's no longer needed, the `object_id` is now stored inline in the object alongside instance variables. We still need the inverse table in case `_id2ref` is invoked, but we lazily build it by walking the heap if that happens. The `object_id` concern is also no longer a GC implementation concern, but a generic implementation. Co-Authored-By: Matt Valentine-House <[email protected]> Notes: Merged: https://.com/ruby/ruby/pull/13159 |
| Ivars will longer be the only thing stored inline via shapes, so keeping the `iv_index` and `ivptr` names would be confusing. Instance variables won't be the only thing stored inline via shapes, so keeping the `ivptr` name would be confusing. `field` encompass anything that can be stored in a VALUE array. Similarly, `gen_ivtbl` becomes `gen_fields_tbl`. Notes: Merged: https://.com/ruby/ruby/pull/13159 |
| https://.com/ruby/ruby/commit/ce51ef30df5bf07ec3881a377f0011b8f20ec507 broke ext/-test-/econv/append.o. We should rebuild that object file when dependencies are updated. Notes: Merged: https://.com/ruby/ruby/pull/13271 |
| https://.com/ruby/digest/commit/d16853fe8c |
| This change addresses the following ASAN error: ``` ==36597==ERROR: AddressSanitizer: heap-use-after-free on address 0x512000396ba8 at pc 0x7fcad5cbad9f bp 0x7fff19739af0 sp 0x7fff19739ae8 WRITE of size 8 at 0x512000396ba8 thread T0 [643/756] 36600=optparse/test_summary #0 0x7fcad5cbad9e in free_fast_fallback_getaddrinfo_entry /home/runner/work/ruby-dev-builder/ruby-dev-builder/ext/socket/raddrinfo.c:3046:22 #1 0x7fcad5c9fb48 in fast_fallback_inetsock_cleanup /home/runner/work/ruby-dev-builder/ruby-dev-builder/ext/socket/ipsocket.c:1179:17 #2 0x7fcadf3b611a in rb_ensure /home/runner/work/ruby-dev-builder/ruby-dev-builder/eval.c:1081:5 #3 0x7fcad5c9b44b in rsock_init_inetsock /home/runner/work/ruby-dev-builder/ruby-dev-builder/ext/socket/ipsocket.c:1289:20 #4 0x7fcad5ca22b8 in tcp_init /home/runner/work/ruby-dev-builder/ruby-dev-builder/ext/socket/tcpsocket.c:76:12 #5 0x7fcadf83ba70 in vm_call0_cfunc_with_frame /home/runner/work/ruby-dev-builder/ruby-dev-builder/./vm_eval.c:164:15 ... ``` A `struct fast_fallback_getaddrinfo_shared` is shared between the main thread and two child threads. This struct contains an array of `fast_fallback_getaddrinfo_entry`. `fast_fallback_getaddrinfo_entry` and `fast_fallback_getaddrinfo_shared` were freed separately, and if `fast_fallback_getaddrinfo_shared` was freed first and then an attempt was made to free a `fast_fallback_getaddrinfo_entry`, a `heap-use-after-free` could occur. This change avoids that possibility by separating the deallocation of the addrinfo memory held by `fast_fallback_getaddrinfo_entry` from the access and lifecycle of the `fast_fallback_getaddrinfo_entry` itself. Notes: Merged-By: shioimm <[email protected]> |
| https://.com/ruby/digest/commit/0df846e8c1 |
| https://.com/ruby/digest/commit/70a805b872 |
| In `digest_conf`, "no implicit conversion of false into String" TypeError is raised. https://.com/ruby/digest/commit/89e5e5fe3a |
| |
| MatchData#named_captures (https://.com/ruby/strscan/pull/146) Fix https://.com/ruby/strscan/pull/145 `MatchData#named_captures` use the last matched value for each name. Reported by Linus Sellberg. Thanks!!! https://.com/ruby/strscan/commit/a6086ea322 |
| https://.com/ruby/psych/commit/3573fb356e |
| https://.com/ruby/psych/commit/9df5501fdc |
| This sets the ivars _before_ calling initialize, which feels wrong. But Data doesn't give us any mechanism for setting the members other than 1) initialize, or 2) drop down into the C API. Since initialize freezes the object, we need to set the ivars before that. I think this is a reasonable compromise—if users need better handling, they can implement their own `encode_with` and `init_with`. But it will lead to unhappy surprises for some users. Alternatively, we could use the C API, similarly to Marshal. Psych _is_ already using the C API for path2class and build_exception. This would be the least surprising behavior for users, I think. |
| https://.com/ruby/psych/commit/788b844c83 |
| This fixes the issue where regular expression would come back slightly different after going through a YAML load/dump cycle. Because we're used to having to escape forward slashes in regular expression literals (because the literal is delimited by slashes), but the deserializer takes the literal output from `Regexp#inspect` and feeds it as a string into `Regexp.new`, which expects a string, not a Regexp literal, cycling did not properly work before this commit. I've also changed the code to be a bit more readable, I hope this doesn't affect performance. https://.com/ruby/psych/commit/f4dd8dadad |
| https://.com/ruby/psych/commit/bb63f91825 |
| Fix: https://.com/ruby/json/issues/796 Notes: Merged: https://.com/ruby/ruby/pull/13227 |
| Since `Set` no longer is a regular object class holding a Hash it needs to be specially handled. https://.com/ruby/psych/commit/c2d185d27c |
| https://.com/ruby/json/commit/6b059900de . |
| https://.com/ruby/json/commit/d7d60cccb0 |
| We should test compilation with `-msse2` because we need to test with whatever arguments Ruby will be compiled with. https://.com/ruby/json/commit/0a871365db |
| `c < 32 || c == 34` is equivalent to `c ^ 2 < 33`. Found in: https://lemire.me/blog/2025/04/13/detect-control-characters-quotes-and-backslashes-efficiently-using-swar/ The gain seem mostly present on micro-benchmark, and even there aren't very consistent, but it's never slower. ``` == Encoding long string (124001 bytes) ruby 3.4.2 (2025-02-15 revision https://.com/ruby/json/commit/d2930f8e7a) +YJIT +PRISM [arm64-darwin24] Warming up -------------------------------------- after 5.295k i/100ms Calculating ------------------------------------- after 55.796k (± 3.4%) i/s (17.92 μs/i) - 280.635k in 5.035690s Comparison: before: 49840.7 i/s after: 55795.8 i/s - 1.12x faster ``` https://.com/ruby/json/commit/034c5debd8 |
| |
| (https://.com/ruby/json/pull/743) See the pull request for the long development history: https://.com/ruby/json/pull/743 ``` == Encoding activitypub.json (52595 bytes) ruby 3.4.2 (2025-02-15 revision https://.com/ruby/json/commit/d2930f8e7a) +YJIT +PRISM [arm64-darwin24] Warming up -------------------------------------- after 2.913k i/100ms Calculating ------------------------------------- after 29.377k (± 2.0%) i/s (34.04 μs/i) - 148.563k in 5.059169s Comparison: before: 23314.1 i/s after: 29377.3 i/s - 1.26x faster == Encoding citm_catalog.json (500298 bytes) ruby 3.4.2 (2025-02-15 revision https://.com/ruby/json/commit/d2930f8e7a) +YJIT +PRISM [arm64-darwin24] Warming up -------------------------------------- after 152.000 i/100ms Calculating ------------------------------------- after 1.569k (± 0.8%) i/s (637.49 μs/i) - 7.904k in 5.039001s Comparison: before: 1485.6 i/s after: 1568.7 i/s - 1.06x faster == Encoding twitter.json (466906 bytes) ruby 3.4.2 (2025-02-15 revision https://.com/ruby/json/commit/d2930f8e7a) +YJIT +PRISM [arm64-darwin24] Warming up -------------------------------------- after 309.000 i/100ms Calculating ------------------------------------- after 3.115k (± 3.1%) i/s (321.01 μs/i) - 15.759k in 5.063776s Comparison: before: 2508.3 i/s after: 3115.2 i/s - 1.24x faster ``` https://.com/ruby/json/commit/49003523da |
| https://.com/ruby/json/commit/b14250f1da |
| We can't directly call `RBASIC_CLASS` as the return value of `to_s` may be an immediate. https://.com/ruby/json/commit/12dc394d11 |
| https://.com/ruby/json/commit/3e025f76d7 |
| Fix: https://.com/ruby/json/issues/790 If we end up calling something that spills the state on the heap, the pointer we received is outdated and may be out of sync. https://.com/ruby/json/commit/2ffa4ea46b |
| Now that we have a hash-set implementation we can use that instead of a hash-table with a static value. |
| https://.com/ruby/json/commit/c985e8c6ea |
| Fix: https://.com/ruby/json/issues/788 `multi_json` rely on it, even though it was never documented as public API. Bringing it back as a method so it can emit a deprecation warning. https://.com/ruby/json/commit/123121bba2 |
| https://.com/ruby/json/commit/84443e881d |
| This time with explicit deprecation warnings. https://.com/ruby/json/commit/0dee9bdad9 |