Commit 355912c
Fix Psych.unsafe_load NoMethodError for Ruby 2.6/2.7
The `Psych.unsafe_load` method was added in Psych 4.0 (Ruby 3.1).
The previous condition checked for Psych::VERSION >= 3.1, which
incorrectly triggered on Ruby 2.6/2.7 where `unsafe_load` doesn't exist.
Changed the condition to use `Psych.respond_to?(:unsafe_load)` to
properly detect when the method is available.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent 1e810a3 commit 355912c
1 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
| 84 | + | |
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
| |||
0 commit comments