Commit 27292b7
Use JSON.generate instead of Hash#to_s for snapshot_key generation
Ruby 3.4 changed how Hash objects are inspected, which caused snapshot_key
values generated via `Digest::MD5.hexdigest(source)` to differ between
Ruby versions. As a result, tests were failing due to mismatched keys.
To ensure a stable and Ruby-version-independent snapshot_key, this change
replaces `hash.to_s` with `JSON.generate(hash)`.
Reference: https://bugs.ruby-lang.org/issues/204331 parent 0ee1017 commit 27292b7
56 files changed
Lines changed: 5 additions & 4 deletions
File tree
- test
- snapshots/herb/template_handler_test
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | | - | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | | - | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
62 | | - | |
| 63 | + | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
69 | | - | |
| 70 | + | |
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
| |||
File renamed without changes.
0 commit comments