From ad5d19552b42b7f386b0e9a82eca21b06ba11f81 Mon Sep 17 00:00:00 2001 From: Ted Ross Date: Mon, 16 Apr 2012 15:49:48 +0000 Subject: 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/qpid@1326659 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/bindings/qmf/ruby/qmf.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'cpp/bindings') diff --git a/cpp/bindings/qmf/ruby/qmf.rb b/cpp/bindings/qmf/ruby/qmf.rb index 34d3255d8d..2cf7233d62 100644 --- a/cpp/bindings/qmf/ruby/qmf.rb +++ b/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) -- cgit v1.2.1