[ 
https://issues.apache.org/jira/browse/THRIFT-2143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15021302#comment-15021302
 ] 

Carl Hall commented on THRIFT-2143:
-----------------------------------

Turns out that I get this error when I build a project using the {{0.9.3}} gem:
{code}
/Users/carl/src/apache/thrift-2143/target/gen-rb/test_service.rb:66:in 
`<class:Test_result>': uninitialized constant Thrift::Types::ENUM (NameError)
  from /Users/carl/src/apache/thrift-2143/target/gen-rb/test_service.rb:61:in 
`<module:TestService>'
  from /Users/carl/src/apache/thrift-2143/target/gen-rb/test_service.rb:11:in 
`<module:Thrift>'
  from /Users/carl/src/apache/thrift-2143/target/gen-rb/test_service.rb:10:in 
`<top (required)>'
  from src/test/rb/test.rb:1:in `require'
  from src/test/rb/test.rb:1:in `<main>'
{code}

This goes away if I build thrift using the patch attached to this issue.

> Generated Ruby client doesn't handle enums
> ------------------------------------------
>
>                 Key: THRIFT-2143
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2143
>             Project: Thrift
>          Issue Type: Bug
>          Components: Ruby - Compiler
>    Affects Versions: 0.9, 0.9.1
>            Reporter: Carl Hall
>         Attachments: thrift-2143.diff
>
>
> The generated ruby client includes and uses enums but doesn't send or receive 
> them correctly. They go out as i32 and are expected to be received as i32. 
> While this is the underlying data type, it breaks things that expect the enum 
> to come through.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to