Match a Regex
This commit is contained in:
parent
ebe94d213b
commit
8fa0f1d4bc
@ -87,7 +87,7 @@ module Guard
|
||||
require "guard/#{name.downcase}"
|
||||
klasses = []
|
||||
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
|
||||
klasses.first
|
||||
rescue LoadError
|
||||
|
Loading…
Reference in New Issue
Block a user