Commit 75e2dd5
fix: Add backward compatibility for YAML.load_file across Psych versions
The `YAML.load_file(path, aliases: true)` syntax works on Ruby 3.4+ with
Psych 5+, but raises ArgumentError on older Ruby/Psych versions that don't
support the aliases parameter.
Added graceful fallback with rescue to support all Ruby versions:
- Try loading with `aliases: true` first (Psych 5+)
- Fall back to `YAML.load_file(path)` on ArgumentError (older Psych)
This ensures the generator works across all supported Ruby versions without
breaking CI on older Ruby environments.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 6904f59 commit 75e2dd5
1 file changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
412 | 412 | | |
413 | 413 | | |
414 | 414 | | |
415 | | - | |
416 | | - | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
417 | 422 | | |
418 | 423 | | |
419 | 424 | | |
| |||
0 commit comments