New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Keyword args with Pysch. #2439

Merged
merged 1 commit into from Oct 26, 2018
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.
+10 −2
Diff settings

Always

Just for now

Copy path View file
@@ -28,11 +28,19 @@ module SafeYAML

if ::YAML.respond_to? :safe_load
def self.safe_load input
::YAML.safe_load(input, WHITELISTED_CLASSES, WHITELISTED_SYMBOLS, true)
if Gem::Version.new(Psych::VERSION) >= Gem::Version.new('3.1.0.pre1')
::YAML.safe_load(input, whitelist_classes: WHITELISTED_CLASSES, whitelist_symbols: WHITELISTED_SYMBOLS, aliases: true)
else
::YAML.safe_load(input, WHITELISTED_CLASSES, WHITELISTED_SYMBOLS, true)
end
end

def self.load input
::YAML.safe_load(input, [::Symbol])
if Gem::Version.new(Psych::VERSION) >= Gem::Version.new('3.1.0.pre1')
::YAML.safe_load(input, whitelist_classes: [::Symbol])
else
::YAML.safe_load(input, [::Symbol])
end
end
else
unless Gem::Deprecate.skip
ProTip! Use n and p to navigate between commits in a pull request.