Fixed the brokeness from 952ec79b

上级 4b4aa8f6
......@@ -16,7 +16,7 @@ module Slice
def slice(*keys)
allowed = Set.new(respond_to?(:convert_key) ? keys.map { |key| convert_key(key) } : keys)
hash = {}
allowed.each { |k| hash[k] = self[k] }
allowed.each { |k| hash[k] = self[k] if has_key?(k) }
hash
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册