You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Jens Geyer (JIRA)" <ji...@apache.org> on 2014/04/08 22:24:16 UTC

[jira] [Comment Edited] (THRIFT-2143) Generated Ruby client doesn't handle enums

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

Jens Geyer edited comment on THRIFT-2143 at 4/8/14 8:23 PM:
------------------------------------------------------------

Hi [~thecarlhall],

I think the added line {{ENUM = 16}} in {{types.rb}} is incorrect. If you compare with any other language, there is no such entry for enums.

{code}
module Thrift
  module Types
    STOP = 0
    VOID = 1
    BOOL = 2
    BYTE = 3
    DOUBLE = 4
    I16 = 6
    I32 = 8
    I64 = 10
    STRING = 11
    STRUCT = 12
    MAP = 13
    SET = 14
    LIST = 15
    ENUM = 16    // <-- this line
  end
{code}



was (Author: jensg):
Hi [~thecarlhall],

I think the added line {{ENUM = 16}} in {{types.rb}} is incorrect. If you compare with any other language, there is no such entry for enums.

{code}
module Thrift
  module Types
    STOP = 0
    VOID = 1
    BOOL = 2
    BYTE = 3
    DOUBLE = 4
    I16 = 6
    I32 = 8
    I64 = 10
    STRING = 11
    STRUCT = 12
    MAP = 13
    SET = 14
    LIST = 15
    ENUM = 16    // <-- this line{color}
  end
{code}


> 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.2#6252)