Match a Regex
This commit is contained in:
parent
ebe94d213b
commit
8fa0f1d4bc
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user