From 3dfa27f1196851864a6c477400b3b70ffb5aff32 Mon Sep 17 00:00:00 2001 From: Bobby McDonald Date: Fri, 18 Oct 2019 00:13:46 -0400 Subject: Remove references to blacklists and whitelists --- lib/hashie/extensions/key_conflict_warning.rb | 2 +- lib/hashie/extensions/parsers/yaml_erb_parser.rb | 7 ++++--- lib/hashie/mash.rb | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) (limited to 'lib') 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 77a852f..dc63c28 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. -- cgit v1.2.1