Blob Blame History Raw
From 38f8e3f8f803a02f20282914be3d245bda330e22 Mon Sep 17 00:00:00 2001
From: tross <tross@13f79535-47bb-0310-9956-ffa450edef68>
Date: Mon, 16 Apr 2012 15:49:48 +0000
Subject: [PATCH 1/2] QPID-3924 - Remove colons from conditionals that cause
 problems in Ruby 1.9 Applied patch from Darryl Pierce.

git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1326659 13f79535-47bb-0310-9956-ffa450edef68
---
 qpid/cpp/bindings/qmf/ruby/qmf.rb |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/qpid/cpp/bindings/qmf/ruby/qmf.rb b/qpid/cpp/bindings/qmf/ruby/qmf.rb
index 34d3255..2cf7233 100644
--- a/qpid/cpp/bindings/qmf/ruby/qmf.rb
+++ b/qpid/cpp/bindings/qmf/ruby/qmf.rb
@@ -26,6 +26,7 @@ module Qmf
 
   # Pull all the TYPE_* constants into Qmf namespace.  Maybe there's an easier way?
   Qmfengine.constants.each do |c|
+    c = c.to_s
     if c.index('TYPE_') == 0 or c.index('ACCESS_') == 0 or c.index('DIR_') == 0 or
         c.index('CLASS_') == 0 or c.index('SEV_') == 0
       const_set(c, Qmfengine.const_get(c))
@@ -348,7 +349,7 @@ module Qmf
       @broker = kwargs[:broker] if kwargs.include?(:broker)
       @allow_sets = :true
 
-      if cls:
+      if cls
         @event_class = cls
         @impl = Qmfengine::Event.new(@event_class.impl)
       elsif kwargs.include?(:impl)
@@ -434,7 +435,7 @@ module Qmf
       @allow_sets = :false
       @broker = kwargs[:broker] if kwargs.include?(:broker)
 
-      if cls:
+      if cls
         @object_class = cls
         @impl = Qmfengine::Object.new(@object_class.impl)
       elsif kwargs.include?(:impl)
-- 
1.7.10.4