Permalink
Browse files

• Refactor: Unify path accessor matchers.

  • Loading branch information...
1 parent dbc2eb3 commit 1bb2d9a73db04d575b6dbb440bcc90c582f1aec0 @mkhl mkhl committed Jan 22, 2009
Showing with 1 addition and 3 deletions.
  1. +1 −3 lib/rush/shell.rb
View
@@ -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 ]

0 comments on commit 1bb2d9a

Please sign in to comment.