You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2011/03/17 21:06:44 UTC

svn commit: r1082670 - /qpid/trunk/qpid/cpp/rubygen/amqpgen.rb

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