Skip to content

Commit 0029b0d

Browse files
shuuuuunrafaelfranca
authored andcommitted
Support HashWithIndifferentAccess#slice
1 parent b7a672b commit 0029b0d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/thor/core_ext/hash_with_indifferent_access.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ def fetch(key, *args)
3838
super(convert_key(key), *args)
3939
end
4040

41+
def slice(*keys)
42+
super(*keys.map{ convert_key(_1) })
43+
end
44+
4145
def key?(key)
4246
super(convert_key(key))
4347
end

0 commit comments

Comments
 (0)