diff options
| author | Alan Conway <aconway@apache.org> | 2011-03-17 20:06:44 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2011-03-17 20:06:44 +0000 |
| commit | 69965eaf398a9c2405dc929d19ed92d1be3ff6bf (patch) | |
| tree | f802a4af4c427cd0fa6bac38ba35d2125b1e1047 /cpp/rubygen | |
| parent | 29d9b77b97cf7fdfecef7558e6a6a99c33a1da4a (diff) | |
| download | qpid-python-69965eaf398a9c2405dc929d19ed92d1be3ff6bf.tar.gz | |
QPID-3116: rubygen with ruby 1.9
Fix name mangling for reserved "type" symbol to work on ruby 1.8 and 1.9.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1082670 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/rubygen')
| -rwxr-xr-x | cpp/rubygen/amqpgen.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cpp/rubygen/amqpgen.rb b/cpp/rubygen/amqpgen.rb index 69e65a4056..20aac35194 100755 --- a/cpp/rubygen/amqpgen.rb +++ b/cpp/rubygen/amqpgen.rb @@ -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. |
