diff --git a/railties/lib/rails/tasks/documentation.rake b/railties/lib/rails/tasks/documentation.rake index f73e333e83..957c375f6a 100644 --- a/railties/lib/rails/tasks/documentation.rake +++ b/railties/lib/rails/tasks/documentation.rake @@ -1,6 +1,6 @@ namespace :doc do def gem_path(gem_name) - path = $LOAD_PATH.grep(/#{gem_name}[\w\-\.]*\/lib$/).first + path = $LOAD_PATH.grep(/#{gem_name}[\w.-]*\/lib$/).first yield File.dirname(path) if path end