зеркало из https://github.com/github/ruby.git
[rubygems/rubygems] Use a writer method on the module instead of a constant
https://github.com/rubygems/rubygems/commit/240d84eea3
This commit is contained in:
Родитель
c2812fb616
Коммит
5dcc7a0326
|
@ -25,11 +25,13 @@ module Gem
|
|||
runtime
|
||||
].freeze
|
||||
|
||||
ALIASES = true # :nodoc:
|
||||
private_constant :ALIASES
|
||||
@aliases_enabled = true
|
||||
def self.aliases_enabled=(value)
|
||||
@aliases_enabled = !!value
|
||||
end
|
||||
|
||||
def self.safe_load(input)
|
||||
::Psych.safe_load(input, permitted_classes: PERMITTED_CLASSES, permitted_symbols: PERMITTED_SYMBOLS, aliases: ALIASES)
|
||||
::Psych.safe_load(input, permitted_classes: PERMITTED_CLASSES, permitted_symbols: PERMITTED_SYMBOLS, aliases: @aliases_enabled)
|
||||
end
|
||||
|
||||
def self.load(input)
|
||||
|
|
Загрузка…
Ссылка в новой задаче