Commit ab29875
Remove core methods now provided by Ruby
Triage Facets core library against Ruby 3.4 built-ins. Remove methods
that Ruby has adopted (many originally from Facets), and fix clashes
where Facets had different semantics than Ruby's version.
Removed (adopted by Ruby):
- Numeric#positive?, #negative? (2.3)
- Object#itself (2.6)
- Enumerable#sum (2.4)
- Symbol#succ (1.9)
- File.write (1.9)
- Process.daemon (1.9)
- Dir#each_child (2.6)
- Kernel#__DIR__ (2.0), #instance_exec (1.9), #singleton_class (1.9)
- Kernel#p override (1.9)
- Method#curry (2.2)
- Class#singleton_class? (3.2), #subclasses (3.1)
- MatchData#match (3.1)
- Range#overlap? (3.3)
- Array#to_h (2.1)
- Hash#except (3.0), Hash#slice (2.5) — bang versions retained
Removed (clashes with different Ruby semantics):
- Array#intersection (clashes with Ruby 2.7 Array#intersection)
- String#crypt override (Ruby deprecated crypt in 3.2)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent adb558a commit ab29875
38 files changed
Lines changed: 26 additions & 714 deletions
File tree
- demo/core
- array
- matchdata
- string
- lib/core/facets
- array
- class
- dir
- enumerable
- file
- hash
- kernel
- matchdata
- method
- numeric
- object
- process
- range
- string
- symbol
- test/core
- array
- class
- dir
- enumerable
- file
- kernel
- matchdata
- range
- string
- symbol
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
40 | 66 | | |
41 | 67 | | |
42 | 68 | | |
| |||
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
0 commit comments