deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject [1/2] git commit: Core: Fix MRI 2.0 compatibility issue in base_driver
Date Wed, 13 Mar 2013 09:40:27 GMT
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 <mfojtik@redhat.com>
Authored: Wed Mar 13 10:39:18 2013 +0100
Committer: Michal fojtik <mfojtik@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' ?


Mime
View raw message