From 8fa0f1d4bcc928572d002e149afa0b0df3a04332 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Re=CC=81my=20Coutable?= Date: Thu, 16 Dec 2010 15:08:05 +0100 Subject: [PATCH] Match a Regex --- lib/guard.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/guard.rb b/lib/guard.rb index 5f9f5e4..e61e5f1 100644 --- a/lib/guard.rb +++ b/lib/guard.rb @@ -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