1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

periods are not metacharacters within character classes

This commit is contained in:
Xavier Noria 2010-03-30 01:55:06 -07:00
parent ebcc4c5e74
commit ce3864aa36

View file

@ -1,6 +1,6 @@
namespace :doc do namespace :doc do
def gem_path(gem_name) 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 yield File.dirname(path) if path
end end