зеркало из https://github.com/github/tainted_hash.git
move symbolize_keys out from the private block
This commit is contained in:
Родитель
c309a8fca6
Коммит
e9721174a1
|
@ -229,6 +229,12 @@ class TaintedHash < Hash
|
|||
%(#<#{self.class}:#{object_id} @hash=#{@original_hash.inspect} @exposed=#{keys.inspect}>)
|
||||
end
|
||||
|
||||
def symbolize_keys
|
||||
to_hash.symbolize_keys
|
||||
end
|
||||
|
||||
undef symbolize_keys!
|
||||
|
||||
private
|
||||
def get_original_hash_value(key_s)
|
||||
set_original_hash_value(key_s, @original_hash[key_s])
|
||||
|
@ -260,12 +266,6 @@ private
|
|||
hash
|
||||
end
|
||||
|
||||
def symbolize_keys
|
||||
to_hash.symbolize_keys
|
||||
end
|
||||
|
||||
undef symbolize_keys!
|
||||
|
||||
module RailsMethods
|
||||
def self.included(base)
|
||||
base.send :alias_method, :stringify_keys!, :stringify_keys
|
||||
|
|
Загрузка…
Ссылка в новой задаче