Skip to content

Commit

Permalink
[rubygems/rubygems] Commit missing new method
Browse files Browse the repository at this point in the history
  • Loading branch information
segiddins authored and matzbot committed Feb 21, 2024
1 parent 466ed0e commit 997470b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/rubygems/safe_yaml.rb
Expand Up @@ -26,10 +26,14 @@ module SafeYAML
].freeze

@aliases_enabled = true
def self.aliases_enabled=(value)
def self.aliases_enabled=(value) # :nodoc:
@aliases_enabled = !!value
end

def self.aliases_enabled? # :nodoc:
@aliases_enabled
end

def self.safe_load(input)
::Psych.safe_load(input, permitted_classes: PERMITTED_CLASSES, permitted_symbols: PERMITTED_SYMBOLS, aliases: @aliases_enabled)
end
Expand Down

0 comments on commit 997470b

Please sign in to comment.