You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by mf...@redhat.com on 2012/05/15 17:15:52 UTC
[PATCH core 20/26] Core: Fixed 19 vs 18 backward compatibility issue
From: Michal Fojtik <mf...@redhat.com>
Signed-off-by: Michal fojtik <mf...@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