Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

• Refactor: Unify path accessor matchers.

  • Loading branch information...
commit 1bb2d9a73db04d575b6dbb440bcc90c582f1aec0 1 parent dbc2eb3
@mkhl mkhl authored
Showing with 1 addition and 3 deletions.
  1. +1 −3 lib/rush/shell.rb
View
4 lib/rush/shell.rb
@@ -108,9 +108,7 @@ def print_result(res)
def path_parts(input) # :nodoc:
case input
- when /((?:@{1,2}|\$|)\w+(?:\[[^\]]+\])*)(\[)(['"])([^\3]+)$/
- $~.to_a.slice(1, 4).push($~.pre_match)
- when /((?:@{1,2}|\$|)\w+(?:\[[^\]]+\])*)(\/)(['"])([^\3]+)$/
+ when /((?:@{1,2}|\$|)\w+(?:\[[^\]]+\])*)([\[\/])(['"])([^\3]+)$/
$~.to_a.slice(1, 4).push($~.pre_match)
else
[ nil, nil, nil, nil, nil ]
Please sign in to comment.
Something went wrong with that request. Please try again.