@blazetrails/ruby-compat
Ruby core/stdlib primitives that trails calls but Rails does not define: a leaf package with no workspace dependencies
| Measure | Value |
|---|---|
| Rails counterpart | none (TypeScript-only package) |
| API methods matched | 2% (10 of 434) |
| Rails tests matched | — |
| Ruby files ported | 1 |
| Ruby files unported | 10 |
| Measured at | fe89b44726 |
Gaps by file
Ported files with Rails methods or tests still missing, largest gap first.
| Ruby file | TypeScript file | Methods missing | Tests matched |
|---|---|---|---|
parser.rb | parser.ts | 12 | — |
Missing methods
The Rails methods parity:api finds no TypeScript counterpart for, by Ruby file.
parser.rb: 12 missing
_racc_do_parse_rb, _racc_yyparse_rb, racc_read_token, racc_shift, racc_reduce, racc_accept, racc_e_pop, racc_next_state, racc_print_stacks, racc_print_states, racc_token2str, racc_runtime_type
Unported Ruby files
compat.rb(3 methods)debugflags.rb(10 methods)grammar.rb(145 methods)grammarfileparser.rb(37 methods)iset.rb(13 methods)logfilegenerator.rb(13 methods)parserfilegenerator.rb(49 methods)sourcetext.rb(6 methods)state.rb(90 methods)statetransitiontable.rb(46 methods)
Deviation receipts
JSDoc receipt tags in the package's source, by the receipt each carries.
| Tag | PERMANENT | CONVERGEABLE | none |
|---|---|---|---|
@noRailsEquivalent | 3020 | 3 | 0 |
@missingRailsCall | 1 | 7 | 0 |
@missingRailsArgs | 0 | 1 | 0 |
@inventedArm | 15 | 0 | 0 |
@perf | 23 | 0 | 0 |
@internal | 21 | 0 | 75 |
Permanently skipped tests
No section cited (18)
- packages/ruby-compat/test/kernel-catch.test.ts:42
- packages/ruby-compat/test/kernel-catch.test.ts:55
- dumps an OpenStruct
- dumps a File without any state
- works on complex keys
- computes the microseconds
- rounds values smaller than 1 usec to 0
- loads an OpenStruct
- loads a File but raise an error when used as it is uninitialized
- returns the YAML representation of a Module object
- returns the YAML representation of a Date object
- returns the YAML representation of a Time object
- returns the YAML representation of a Error object
- works on complex keys
- computes the microseconds
- rounds values smaller than 1 usec to 0
- loads an OpenStruct
- loads a File but raise an error when used as it is uninitialized
Method visibility is compile-time only (Module#private, basic_obj_respond_to's pub) (2)
Ruby Strings are JS string primitives (no mutable String carrier) (2)
Ratified deviations
Each rule below is ratified in the repository's CLAUDE.md files. The first paragraph is quoted; the link opens the full section at this build's commit.
Method visibility is compile-time only (Module#private, basic_obj_respond_to's pub)
Ruby's basic_obj_respond_to (vendor/ruby/v3.3.11/vm_method.c:2864-2879) takes a pub flag and hands it to method_boundp (:1788-1818), so respond_to?(:m) and respond_to?(:m, true) can answer differently for the same receiver, and Kernel#public_send (vm_eval.c:1350) raises NoMethodError "private method '…' called for …" where send dispatches. Visibility is a property of the method entry, readable at run time.
Ruby Strings are JS string primitives (no mutable String carrier)
A Ruby String is a mutable object with identity. str << "x" and str.replace("y") change the receiver in place, str.dup is a second object with the same content, and frozen? is a per-object fact. ActiveModel leans on all three: