Pass keyword argument to XML::Querying#xpath implicitly

This commit is contained in:
Kitaiti Makoto 2020-01-10 20:17:02 +09:00
parent ac3fe8f343
commit 804f755101
1 changed files with 2 additions and 2 deletions

View File

@ -63,8 +63,8 @@ module Oga
#
# @see [#xpath]
# @return [Oga::XML::Node|Oga::XML::Attribute]
def at_xpath(*args)
result = xpath(*args)
def at_xpath(*args, namespaces: nil)
result = xpath(*args, namespaces: namespaces)
result.is_a?(XML::NodeSet) ? result.first : result
end