Match a Regex

This commit is contained in:
Rémy Coutable 2010-12-16 15:08:05 +01:00
parent ebe94d213b
commit 8fa0f1d4bc

View File

@ -87,7 +87,7 @@ module Guard
require "guard/#{name.downcase}" require "guard/#{name.downcase}"
klasses = [] klasses = []
ObjectSpace.each_object(Class) do |klass| ObjectSpace.each_object(Class) do |klass|
klasses << klass if klass.to_s.downcase.match "^guard::#{name.downcase}" klasses << klass if klass.to_s.downcase.match(/^guard::#{name.downcase}/)
end end
klasses.first klasses.first
rescue LoadError rescue LoadError