Skip to content

Commit

Permalink
Remove redundant namespace raising an exception
Browse files Browse the repository at this point in the history
There is no need to be so explicit to raise an exception which is
defined in its same class.
  • Loading branch information
eduardoj committed Jan 31, 2023
1 parent 6d7b5b2 commit 13d935f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/lib/xpath_engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ def evaluate_expr(expr, root, escape = false)

if @last_key && @attribs[table][@last_key][:split]
tvalues = value.split(@attribs[table][@last_key][:split])
raise XpathEngine::IllegalXpathError, 'attributes must be $NAMESPACE:$NAME' if tvalues.size != 2
raise IllegalXpathError, 'attributes must be $NAMESPACE:$NAME' if tvalues.size != 2

@condition_values_needed.times { @condition_values << tvalues }
elsif @last_key && @attribs[table][@last_key][:double]
Expand Down

0 comments on commit 13d935f

Please sign in to comment.