Author: aconway
Date: Mon Mar 21 18:13:28 2011
New Revision: 1083889
URL: http://svn.apache.org/viewvc?rev=1083889&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/branches/0.10/qpid/cpp/rubygen/amqpgen.rb
Modified: qpid/branches/0.10/qpid/cpp/rubygen/amqpgen.rb
URL:
http://svn.apache.org/viewvc/qpid/branches/0.10/qpid/cpp/rubygen/amqpgen.rb?rev=1083889&r1=1083888&r2=1083889&view=diff
==============================================================================
--- qpid/branches/0.10/qpid/cpp/rubygen/amqpgen.rb (original)
+++ qpid/branches/0.10/qpid/cpp/rubygen/amqpgen.rb Mon Mar 21 18:13:28 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:[email protected]