Commit graph

1077 commits

Author SHA1 Message Date
Nobuyoshi Nakada
aad9fa2853
Use RB_VM_LOCKING 2025-05-25 15:22:43 +09:00
Daniel Colson
0564973196 [Bug #21357] Fix crash in Hash#merge with block
Prior to 49b306ecb9
the `optional_arg` passed from `rb_hash_update_block_i` to `tbl_update`
was a hash value (i.e. a VALUE). After that commit it changed to an
`update_call_args`.

If the block sets or changes the value, `tbl_update_modify` will set the
`arg.value` back to an actual value and we won't crash. But in the case
where the block returns the original value we end up calling
`RB_OBJ_WRITTEN` with the `update_call_args` which is not expected and
may crash.

`arg.value` appears to only be used to pass to `RB_OBJ_WRITTEN` (others
who need the `update_call_args` get it from `arg.arg`), so I don't think
it needs to be set to anything upfront. And `tbl_update_modify` will set
the `arg.value` in the cases we need the write barrier.
2025-05-22 12:25:55 +09:00
Nobuyoshi Nakada
49b306ecb9 [Bug #21333] Prohibit hash modification inside Hash#update block 2025-05-15 15:39:15 +09:00
Nobuyoshi Nakada
7793b59c8d
[Bug #21331] Prohibit hash modification during stlike loop 2025-05-14 10:37:59 +09:00
Nobuyoshi Nakada
7f5b4fb26e
Remove unused retval assignments 2025-05-14 10:26:04 +09:00
Nobuyoshi Nakada
b66c5c3b1b
Revert "[Bug #21331] Prohibit modification during stlike loop"
This reverts commit bb180b87b4, which
caused "malloc during GC" error on wasm.
2025-05-14 10:23:16 +09:00
Nobuyoshi Nakada
bb180b87b4 [Bug #21331] Prohibit modification during stlike loop 2025-05-13 23:16:58 +09:00
Jeremy Evans
926411171d
Support Marshal.{dump,load} for core Set
This was missed when adding core Set, because it's handled
implicitly for T_OBJECT.

Keep marshal compatibility between core Set and stdlib Set,
so you can unmarshal core Set with stdlib Set and vice versa.

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2025-04-28 08:38:35 -07:00
BurdetteLamar
3a7b03242f [DOC] Tweaks for Hash doc 2025-04-02 12:10:56 -04:00
BurdetteLamar
2d9036498e [DOC] Tweaks for Hash doc 2025-03-31 14:49:40 -04:00
Burdette Lamar
cdb1bf1e53
[DOC] Tweaks for Hash#update 2025-03-31 14:47:20 -04:00
BurdetteLamar
9e87323ad0 [DOC] Tweaks for Hash#values_at 2025-03-29 17:05:21 -04:00
BurdetteLamar
dbc1ceca32 [DOC] Tweaks for Hash#values 2025-03-29 17:04:56 -04:00
BurdetteLamar
4e3bc65e88 [DOC] Tweaks for Hash#has_value? 2025-03-29 17:04:33 -04:00
Burdette Lamar
0b186ed413
[DOC] Doc for Hash#transform_keys! (#12942) 2025-03-25 15:26:51 -04:00
Burdette Lamar
12b2b577b7
[DOC] Doc for Hash#transform_values! 2025-03-23 11:09:08 -04:00
BurdetteLamar
383af53a56 [DOC] Doc for Hash#transform_values 2025-03-23 11:07:31 -04:00
Peter Zhu
2dc501497e [DOC] Fix indentation for documentation of Hash#compact 2025-03-17 16:12:34 -04:00
BurdetteLamar
70a9e5f6eb [DOC] Doc for Hash#transform_keys 2025-03-16 11:35:32 -04:00
Burdette Lamar
efb2d43637
[DOC] Tweaks for Hash#to_h (#12918) 2025-03-14 10:41:27 -04:00
BurdetteLamar
a4328a424b [DOC] Tweaks for Hash#to_hash 2025-03-13 21:12:08 -04:00
BurdetteLamar
057ee25d1b [DOC] Tweaks for Hash#to_proc 2025-03-13 21:11:47 -04:00
Burdette Lamar
1b2cc9c2b8
[DOC] Tweaks for Hash#slice 2025-03-11 21:54:49 -04:00
BurdetteLamar
86eff8565b [DOC] Tweaks for Hash#to_a 2025-03-11 21:54:06 -04:00
BurdetteLamar
5208d2f440 [DOC] Tweaks for Hash#shift 2025-03-11 21:52:38 -04:00
Burdette Lamar
b52f789520
[DOC] Tweaks for Hash#select! (#12904) 2025-03-11 15:19:38 -04:00
Burdette Lamar
a5f29213dc
[DOC] Tweaks for Hash#select (#12903) 2025-03-11 15:18:47 -04:00
Burdette Lamar
51e2ff1ef7
[DOC] Tweaks for Hash#reject! 2025-03-11 15:18:06 -04:00
Burdette Lamar
497f409ba4
[DOC] Tweaks for Hash#reject (#12876) 2025-03-11 11:43:50 -04:00
Burdette Lamar
e99026784a
[DOC] Tweaks for Hash#update 2025-03-11 11:43:20 -04:00
Burdette Lamar
17f6a68962
[DOC] Tweaks for Hash#rehash 2025-03-07 09:38:51 -05:00
BurdetteLamar
8774530ce1 [DOC] Tweaks for Hash#rassoc 2025-03-07 09:36:51 -05:00
Burdette Lamar
42b75a9c64
[DOC] Tweaks for Hash#merge (#12825) 2025-03-07 09:34:36 -05:00
BurdetteLamar
5de02d6487 [DOC] Tweaks for Hash#size 2025-03-04 09:22:19 -05:00
BurdetteLamar
1b6fddf4db [DOC] Tweaks for Hash#keep_if 2025-02-26 15:52:45 -05:00
BurdetteLamar
04e46bd75c [DOC] Tweaks for Hash#key 2025-02-26 15:52:13 -05:00
BurdetteLamar
8dce189078 [DOC] Tweaks for Hash#keys 2025-02-26 15:51:58 -05:00
Burdette Lamar
3bbb029d44
[DOC] Tweaks for Hash#invert 2025-02-26 09:28:52 -05:00
BurdetteLamar
43a729b1be [DOC] Tweaks for Hash#replace 2025-02-26 09:28:05 -05:00
BurdetteLamar
a870419f3a [DOC] Tweaks for Hash#inspect 2025-02-26 09:27:55 -05:00
BurdetteLamar
8749a131ce [DOC] Tweaks for Hash#include? 2025-02-24 19:27:41 -05:00
BurdetteLamar
0615df2a84 [DOC] Tweaks for Hash#hash 2025-02-24 19:27:31 -05:00
Burdette Lamar
19f7961e46
[DOC] Tweaks for Hash#flatten 2025-02-24 19:26:50 -05:00
BurdetteLamar
4129973005 [DOC] Tweaks for Hash#fetch_values 2025-02-21 11:53:51 -05:00
BurdetteLamar
273e35cdcc [DOC] Tweaks for Hash#fetch 2025-02-19 09:46:52 -05:00
BurdetteLamar
a46997a8f7 [DOC] Tweaks for Hash#except 2025-02-19 09:46:04 -05:00
Burdette Lamar
188b3375b0
[DOC] Tweaks for Hash#eql? 2025-02-19 09:45:27 -05:00
Nobuyoshi Nakada
3f07bc76ff [Bug #21144] Win32: Use Windows time zone ID if TZ is not set
If the TZ environment variable is not set, the time zone names
retrieved from the system are localized for UI display and may vary
across editions and language packs for the same time zone.
Use the time zone IDs that are invariant across environments instead.
2025-02-19 18:27:32 +09:00
Burdette Lamar
27ba268b75
[DOC] Tweaks for Hash#empty? 2025-02-18 15:29:27 -05:00
BurdetteLamar
fd134cf6d2 [DOC] Tweaks for Hash#each_value 2025-02-18 15:02:05 -05:00