Commit 45fca436 authored by MenTaLguY's avatar MenTaLguY Committed by mental

separate invariant check from main logic for clarity

(bzr r1592)
parent 3faef659
......@@ -78,9 +78,9 @@ def parsePath(d)
lastCommand = nil
lexPath(d) do |token, isCommand|
if command
raise 'Invalid number of parameters' if isCommand
else
raise 'Invalid number of parameters' if command and isCommand
unless command
if isCommand
raise 'Invalid path, must begin with moveto.' \
unless lastCommand or token.upcase == 'M'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment