diff options
| author | MenTaLguY <mental@rydia.net> | 2006-08-12 15:34:39 +0000 |
|---|---|---|
| committer | mental <mental@users.sourceforge.net> | 2006-08-12 15:34:39 +0000 |
| commit | 45fca436d336b7f250689e82a9e7ec1dec7bbb01 (patch) | |
| tree | 53a3c36c4a44b4d78a33273824a94e2041bb39e0 | |
| parent | update livarot_path after committing change; fixes 1534994 (diff) | |
| download | inkscape-45fca436d336b7f250689e82a9e7ec1dec7bbb01.tar.gz inkscape-45fca436d336b7f250689e82a9e7ec1dec7bbb01.zip | |
separate invariant check from main logic for clarity
(bzr r1592)
| -rwxr-xr-x | share/extensions/simplepath.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/share/extensions/simplepath.rb b/share/extensions/simplepath.rb index 466a75d10..3d9b7b372 100755 --- a/share/extensions/simplepath.rb +++ b/share/extensions/simplepath.rb @@ -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' |
