diff options
author | Daniel Doubrovkine (dB.) @dblockdotorg <dblock@dblock.org> | 2019-10-28 16:29:22 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-28 16:29:22 -0400 |
commit | 15daf67780baf538cd5ccaf4ebc5564a17001922 (patch) | |
tree | f83e35c9170aa1d375cb5dfe87db7bf162983f13 /lib | |
parent | 65a813798ad5dbd3f2dff819e1386e126abc4ebf (diff) | |
parent | 3dfa27f1196851864a6c477400b3b70ffb5aff32 (diff) | |
download | hashie-15daf67780baf538cd5ccaf4ebc5564a17001922.tar.gz |
Merge pull request #492 from BobbyMcWho/remove-blacklist-whitelist
Remove references to blacklists and whitelists
Diffstat (limited to 'lib')
-rw-r--r-- | lib/hashie/extensions/key_conflict_warning.rb | 2 | ||||
-rw-r--r-- | lib/hashie/extensions/parsers/yaml_erb_parser.rb | 7 | ||||
-rw-r--r-- | lib/hashie/mash.rb | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/lib/hashie/extensions/key_conflict_warning.rb b/lib/hashie/extensions/key_conflict_warning.rb index 7ce56a1..875bad2 100644 --- a/lib/hashie/extensions/key_conflict_warning.rb +++ b/lib/hashie/extensions/key_conflict_warning.rb @@ -34,7 +34,7 @@ module Hashie @disable_warnings ||= false end - # Returns an array of blacklisted methods that this class disables warnings for. + # Returns an array of methods that this class disables warnings for. # # @api semipublic # @return [Boolean] diff --git a/lib/hashie/extensions/parsers/yaml_erb_parser.rb b/lib/hashie/extensions/parsers/yaml_erb_parser.rb index 05edc40..6a259cb 100644 --- a/lib/hashie/extensions/parsers/yaml_erb_parser.rb +++ b/lib/hashie/extensions/parsers/yaml_erb_parser.rb @@ -15,10 +15,11 @@ module Hashie def perform template = ERB.new(@content) template.filename = @file_path - whitelist_classes = @options.fetch(:whitelist_classes) { [] } - whitelist_symbols = @options.fetch(:whitelist_symbols) { [] } + permitted_classes = @options.fetch(:permitted_classes) { [] } + permitted_symbols = @options.fetch(:permitted_symbols) { [] } aliases = @options.fetch(:aliases) { true } - YAML.safe_load template.result, whitelist_classes, whitelist_symbols, aliases + # TODO: Psych in newer rubies expects these args to be keyword args. + YAML.safe_load template.result, permitted_classes, permitted_symbols, aliases end def self.perform(file_path, options = {}) diff --git a/lib/hashie/mash.rb b/lib/hashie/mash.rb index 27e6409..7c916fa 100644 --- a/lib/hashie/mash.rb +++ b/lib/hashie/mash.rb @@ -103,7 +103,7 @@ module Hashie # Creates a new anonymous subclass with key conflict # warnings disabled. You may pass an array of method - # symbols to restrict the warnings blacklist to. + # symbols to restrict the disabled warnings to. # Hashie::Mash.quiet.new(hash) all warnings disabled. # Hashie::Mash.quiet(:zip).new(hash) only zip warning # is disabled. |