[jira] [Commented] (QPID-3116) rubygen with ruby 1.9

2011-03-21 Thread Justin Ross (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-3116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13009149#comment-13009149
 ] 

Justin Ross commented on QPID-3116:
---

Approved for 0.10.  Reviewed by Alan Conway.

 rubygen with ruby 1.9
 -

 Key: QPID-3116
 URL: https://issues.apache.org/jira/browse/QPID-3116
 Project: Qpid
  Issue Type: Bug
  Components: Build Tools
Affects Versions: 0.9
 Environment: Ruby 1.9.2
Reporter: Geoffrey Clements
Assignee: Alan Conway
Priority: Minor
 Fix For: 0.10

 Attachments: amqpgen.rb.patch

   Original Estimate: 1h
  Remaining Estimate: 1h

 The ampqgen.rb script appends an underscore to attributes that may conflict 
 with attributes that may already exist in object. The issue is with 'type'. 
 It is an attribute in ruby 1.8.x but not in 1.9.x. The code accesses a type_ 
 attribute in the code which doesn't actually exist when running under 1.9.x 
 because type isn't an attribute. The fis is a simple special case for the 
 type symbol.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



[jira] Commented: (QPID-3116) rubygen with ruby 1.9

2011-03-17 Thread Alan Conway (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-3116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13008102#comment-13008102
 ] 

Alan Conway commented on QPID-3116:
---

Comitted to trunk #1082670. 

 rubygen with ruby 1.9
 -

 Key: QPID-3116
 URL: https://issues.apache.org/jira/browse/QPID-3116
 Project: Qpid
  Issue Type: Bug
  Components: Build Tools
Affects Versions: 0.9
 Environment: Ruby 1.9.2
Reporter: Geoffrey Clements
Assignee: Alan Conway
Priority: Minor
 Fix For: 0.9

 Attachments: amqpgen.rb.patch

   Original Estimate: 1h
  Remaining Estimate: 1h

 The ampqgen.rb script appends an underscore to attributes that may conflict 
 with attributes that may already exist in object. The issue is with 'type'. 
 It is an attribute in ruby 1.8.x but not in 1.9.x. The code accesses a type_ 
 attribute in the code which doesn't actually exist when running under 1.9.x 
 because type isn't an attribute. The fis is a simple special case for the 
 type symbol.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



[jira] Commented: (QPID-3116) rubygen with ruby 1.9

2011-03-04 Thread Geoffrey Clements (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-3116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13002764#comment-13002764
 ] 

Geoffrey Clements commented on QPID-3116:
-

The fix that works under both ruby 1.8 and 1.9 is:

Index: rubygen/amqpgen.rb
===
--- rubygen/amqpgen.rb  (revision 1076181)
+++ rubygen/amqpgen.rb  (working copy)
@@ -61,7 +61,8 @@
 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.


 rubygen with ruby 1.9
 -

 Key: QPID-3116
 URL: https://issues.apache.org/jira/browse/QPID-3116
 Project: Qpid
  Issue Type: Bug
  Components: Build Tools
Affects Versions: 0.9
 Environment: Ruby 1.9.2
Reporter: Geoffrey Clements
Priority: Minor
 Fix For: 0.9

   Original Estimate: 1h
  Remaining Estimate: 1h

 The ampqgen.rb script appends an underscore to attributes that may conflict 
 with attributes that may already exist in object. The issue is with 'type'. 
 It is an attribute in ruby 1.8.x but not in 1.9.x. The code accesses a type_ 
 attribute in the code which doesn't actually exist when running under 1.9.x 
 because type isn't an attribute. The fis is a simple special case for the 
 type symbol.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



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