Skip to content

Commit

Permalink
Use 1.8-compatible regexp
Browse files Browse the repository at this point in the history
  • Loading branch information
drbrain committed Mar 27, 2014
1 parent 2b1a8b0 commit 8955158
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/rake/application.rb
Expand Up @@ -151,7 +151,10 @@ def invoke_task(task_string) # :nodoc:
end

def parse_task_string(string) # :nodoc:
/^(?<name>[^\[]+)(\[(?<remaining_args>.*)\])$/ =~ string
/^([^\[]+)(?:\[(.*)\])$/ =~ string

name = $1
remaining_args = $2

return string, [] unless name
return name, [] if remaining_args.empty?
Expand Down

0 comments on commit 8955158

Please sign in to comment.