Commit f08b8ce
fix: align core_ext polyfills more closely with active_support implementations
blank?/present?:
- String#blank? now uses /\A[[:space:]]*\z/ regex to correctly handle Unicode
whitespace (e.g. ) instead of strip.empty? which is ASCII-only
- Add Symbol#blank? aliased to empty? (was missing, active_support covers it)
- Array/Hash#blank? use alias_method like active_support instead of explicit def
- Object#blank? fallback returns false instead of !self (equivalent in practice
but matches active_support intent more clearly)
deep_dup:
- Hash#deep_dup now starts from dup to preserve hash metadata (default values,
default procs, compare_by_identity state); optimises String/Symbol keys to
avoid unnecessary key re-insertion
- Add Module#deep_dup: named modules return self, anonymous modules are duped
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 74bc9a6 commit f08b8ce
1 file changed
Lines changed: 30 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
25 | 35 | | |
26 | 36 | | |
27 | 37 | | |
28 | 38 | | |
29 | | - | |
| 39 | + | |
30 | 40 | | |
31 | 41 | | |
32 | 42 | | |
33 | 43 | | |
34 | | - | |
| 44 | + | |
35 | 45 | | |
36 | 46 | | |
37 | 47 | | |
38 | 48 | | |
39 | | - | |
| 49 | + | |
40 | 50 | | |
41 | 51 | | |
42 | 52 | | |
| |||
62 | 72 | | |
63 | 73 | | |
64 | 74 | | |
65 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
66 | 91 | | |
67 | 92 | | |
68 | 93 | | |
0 commit comments