Skip to content

Commit

Permalink
More changes to keyword arguments with **options.
Browse files Browse the repository at this point in the history
  • Loading branch information
gkellogg committed Jan 4, 2023
1 parent 6af0702 commit f86971f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions lib/sparql/algebra/operator/extend.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ def execute(queryable, **options, &block)
operand(0).each do |(var, expr)|
begin
val = expr.evaluate(solution, queryable: queryable,
depth: options[:depth].to_i + 1,
**options)
**options.merge(depth: options[:depth].to_i + 1))
debug(options) {"===> + #{var} => #{val.inspect}"}
val = val.dup.bind(solution) if val.is_a?(RDF::Query::Pattern)
solution.bindings[var.to_sym] = val
Expand Down
3 changes: 1 addition & 2 deletions lib/sparql/algebra/operator/path.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ def execute(queryable, **options, &block)
subject: subject,
object: object,
graph_name: options.fetch(:graph_name, false),
depth: options[:depth].to_i + 1,
**options
**options.merge(depth: options[:depth].to_i + 1)
) do |solution|
@solutions << solution
end
Expand Down
2 changes: 1 addition & 1 deletion spec/support/matchers/generate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
RSpec::Matchers.define :generate do |expected, options|
def parser(**options)
Proc.new do |query|
parser = SPARQL::Grammar::Parser.new(query, logger: options[:logger], resolve_iris: true, **options)
parser = SPARQL::Grammar::Parser.new(query, resolve_iris: true, **options)
options[:production] ? parser.parse(options[:production]) : parser.parse
end
end
Expand Down

0 comments on commit f86971f

Please sign in to comment.