qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject svn commit: r1082670 - /qpid/trunk/qpid/cpp/rubygen/amqpgen.rb
Date Thu, 17 Mar 2011 20:06:44 GMT
Author: aconway
Date: Thu Mar 17 20:06:44 2011
New Revision: 1082670

URL: http://svn.apache.org/viewvc?rev=1082670&view=rev
Log:
QPID-3116: rubygen with ruby 1.9

Fix name mangling for reserved "type" symbol to work on ruby 1.8 and 1.9.

Modified:
    qpid/trunk/qpid/cpp/rubygen/amqpgen.rb

Modified: qpid/trunk/qpid/cpp/rubygen/amqpgen.rb
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/rubygen/amqpgen.rb?rev=1082670&r1=1082669&r2=1082670&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/rubygen/amqpgen.rb (original)
+++ qpid/trunk/qpid/cpp/rubygen/amqpgen.rb Thu Mar 17 20:06:44 2011
@@ -61,7 +61,8 @@ end
 class Module
   # Add trailing _ to avoid conflict with Object methods.
   def mangle(sym)
-    (Object.method_defined? sym) ? (sym.to_s+"_").intern : sym
+    sym =  (sym.to_s+"_").to_sym if (Object.method_defined?(sym) or sym == :type)
+    sym
   end
 
   # Add attribute reader for XML attribute.



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message