Skip to content

Commit

Permalink
Add comment regarding the conditional override of YAML.unsafe_load
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyevans authored and ioquatix committed Jan 25, 2022
1 parent ee76ddf commit e23b9eb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/spec_mock.rb
Expand Up @@ -3,6 +3,9 @@
require_relative 'helper'
require 'yaml'

# Work correctly with older versions of Psych, having
# unsafe_load call load (in older versions, load operates
# as unsafe_load in current version).
unless YAML.respond_to?(:unsafe_load)
def YAML.unsafe_load(body)
load(body)
Expand Down

0 comments on commit e23b9eb

Please sign in to comment.