mirror of https://github.com/rails/rails
Remove extra conditions in HWIDA since Rails 6 does not support Ruby 2.2
See https://github.com/ruby/ruby/blob/ruby_2_3/NEWS
This commit is contained in:
parent
debe9a5cbe
commit
2bfef0d21f
|
@ -177,7 +177,6 @@ module ActiveSupport
|
|||
super(convert_key(key), *extras)
|
||||
end
|
||||
|
||||
if Hash.new.respond_to?(:dig)
|
||||
# Same as <tt>Hash#dig</tt> where the key passed as argument can be
|
||||
# either a string or a symbol:
|
||||
#
|
||||
|
@ -191,7 +190,6 @@ module ActiveSupport
|
|||
args[0] = convert_key(args[0]) if args.size > 0
|
||||
super(*args)
|
||||
end
|
||||
end
|
||||
|
||||
# Same as <tt>Hash#default</tt> where the key passed as argument can be
|
||||
# either a string or a symbol:
|
||||
|
@ -228,7 +226,7 @@ module ActiveSupport
|
|||
# hash.fetch_values('a', 'c') # => KeyError: key not found: "c"
|
||||
def fetch_values(*indices, &block)
|
||||
indices.collect { |key| fetch(key, &block) }
|
||||
end if Hash.method_defined?(:fetch_values)
|
||||
end
|
||||
|
||||
# Returns a shallow copy of the hash.
|
||||
#
|
||||
|
|
|
@ -169,8 +169,6 @@ class HashWithIndifferentAccessTest < ActiveSupport::TestCase
|
|||
end
|
||||
|
||||
def test_indifferent_fetch_values
|
||||
skip unless Hash.method_defined?(:fetch_values)
|
||||
|
||||
@mixed = @mixed.with_indifferent_access
|
||||
|
||||
assert_equal [1, 2], @mixed.fetch_values("a", "b")
|
||||
|
|
Loading…
Reference in New Issue