Skip to content

Commit

Permalink
Fixing some odd Thor::Options regexp quirks.
Browse files Browse the repository at this point in the history
  • Loading branch information
nex3 committed May 22, 2008
1 parent ce83dbd commit 6a9237f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/thor/options.rb
Expand Up @@ -7,9 +7,9 @@ class Thor
class Options
class Error < StandardError; end

LONG_RE = /^(--\w+[-\w+]*)?$/
LONG_RE = /^(--\w+[-\w+]*)$/
SHORT_RE = /^(-\w)$/
LONG_EQ_RE = /^(--\w+[-\w+]*)?=(.*?)$|(-\w?)=(.*?)$/
LONG_EQ_RE = /^(--\w+[-\w+]*)=(.*?)$|(-\w?)=(.*?)$/
SHORT_SQ_RE = /^-(\w\S+?)$/ # Allow either -x -v or -xv style for single char args

attr_accessor :args
Expand Down

0 comments on commit 6a9237f

Please sign in to comment.