deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject git commit: Core: Fixed problem with is_state? helper in Instance
Date Mon, 23 Jul 2012 13:41:23 GMT
Updated Branches:
  refs/heads/master ba70143ef -> ea4e35841


Core: Fixed problem with is_state? helper in Instance

Using MRI 1.8, the method_missing provides method name
as Symbol, but however 1.8 does not automatically convert it
into String.


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

Branch: refs/heads/master
Commit: ea4e358414fba3146322a0a0802dc6b6f0cede63
Parents: ba70143
Author: Michal Fojtik <mfojtik@redhat.com>
Authored: Mon Jul 23 15:39:40 2012 +0200
Committer: Michal fojtik <mfojtik@redhat.com>
Committed: Mon Jul 23 15:42:14 2012 +0200

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


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/ea4e3584/server/lib/deltacloud/models/instance.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/models/instance.rb b/server/lib/deltacloud/models/instance.rb
index 303691d..465451f 100644
--- a/server/lib/deltacloud/models/instance.rb
+++ b/server/lib/deltacloud/models/instance.rb
@@ -62,7 +62,7 @@ class Instance < BaseModel
   end
 
   def method_missing(name, *args)
-    if name =~ /is_(\w+)\?/
+    if name.to_s =~ /is_(\w+)\?/
       self.state.downcase.eql?($1)
     else
       raise NoMethodError.new(name.to_s)


Mime
View raw message