lib/thor/parser/arguments.rb in thor-0.20.3 vs lib/thor/parser/arguments.rb in thor-1.0.0

- old
+ new

@@ -7,11 +7,11 @@ # def self.split(args) arguments = [] args.each do |item| - break if item =~ /^-/ + break if item.is_a?(String) && item =~ /^-/ arguments << item end [arguments, args[Range.new(arguments.size, -1)]] end @@ -80,10 +80,10 @@ @pile.unshift(arg) end end def current_is_value? - peek && peek.to_s !~ /^-/ + peek && peek.to_s !~ /^-{1,2}\S+/ end # Runs through the argument array getting strings that contains ":" and # mark it as a hash: #