You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltacloud.apache.org by mf...@apache.org on 2013/03/13 10:40:27 UTC

[1/2] git commit: Core: Fix MRI 2.0 compatibility issue in base_driver

Core: Fix MRI 2.0 compatibility issue in base_driver


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/7de62289
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/7de62289
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/7de62289

Branch: refs/heads/master
Commit: 7de622893a294d60064bab93ec9aed9244768f4c
Parents: e961458
Author: Michal Fojtik <mf...@redhat.com>
Authored: Wed Mar 13 10:39:18 2013 +0100
Committer: Michal fojtik <mf...@redhat.com>
Committed: Wed Mar 13 10:39:18 2013 +0100

----------------------------------------------------------------------
 server/lib/deltacloud/drivers/base_driver.rb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/7de62289/server/lib/deltacloud/drivers/base_driver.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/drivers/base_driver.rb b/server/lib/deltacloud/drivers/base_driver.rb
index 52fbd27..85a2148 100644
--- a/server/lib/deltacloud/drivers/base_driver.rb
+++ b/server/lib/deltacloud/drivers/base_driver.rb
@@ -147,7 +147,7 @@ module Deltacloud
     end
 
     def has_capability?(method)
-      method = (RUBY_VERSION =~ /^1\.9/) ? method : method.to_s
+      method = (RUBY_VERSION < '1.9') ? method.to_s : method
       # Prevent has_capability fail when driver is inherited from another
       # driver, like Eucalyptus
       superclass_methods = self.class.superclass.name == 'Deltacloud::BaseDriver' ?