deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@redhat.com
Subject [PATCH core 20/26] Core: Fixed 19 vs 18 backward compatibility issue
Date Tue, 15 May 2012 15:15:52 GMT
From: Michal Fojtik <mfojtik@redhat.com>


Signed-off-by: Michal fojtik <mfojtik@redhat.com>
---
 server/lib/deltacloud/drivers/base_driver.rb |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/server/lib/deltacloud/drivers/base_driver.rb b/server/lib/deltacloud/drivers/base_driver.rb
index f3637b7..3d4c75d 100644
--- a/server/lib/deltacloud/drivers/base_driver.rb
+++ b/server/lib/deltacloud/drivers/base_driver.rb
@@ -144,7 +144,8 @@ module Deltacloud
     end
 
     def has_capability?(method)
-      (self.class.instance_methods - self.class.superclass.methods).include? method
+      method = (RUBY_VERSION =~ /^1\.9/) ? method : method.to_s
+      (self.class.instance_methods - self.class.superclass.instance_methods).include? method
     end
 
     ## Capabilities
-- 
1.7.10.1


Mime
View raw message