Skip to content

Compatibility with Ruby 3.1#17

Open
grk wants to merge 1 commit intoiostat:masterfrom
messhelden:ruby-31-compat
Open

Compatibility with Ruby 3.1#17
grk wants to merge 1 commit intoiostat:masterfrom
messhelden:ruby-31-compat

Conversation

@grk
Copy link

@grk grk commented Mar 22, 2022

With Ruby 3.1 psych version gets bumped to 4.x, which changes the behavior of YAML.load to YAML.safe_load. Since this YAML content is controlled by this gem, we can assume it's safe to keep the old default behavior of unsafe_load.

Since old psych versions don't implement unsafe_load, we need to dynamically evaluate which method to use at load time.

With Ruby 3.1 psych version gets bumped to 4.x, which changes the behavior
of YAML.load to YAML.safe_load. Since this YAML content is controlled by
this gem, we can assume it's safe to keep the old default behavior of
unsafe_load.

Since old psych versions don't implement unsafe_load, we need to
dynamically evaluate which method to use at load time.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant