Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-1916

Compiled ruby code generates warning if field with name "fields" is present

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 0.9
    • Fix Version/s: None
    • Component/s: Ruby - Compiler
    • Labels:
      None

      Description

      The compiler generates ruby code which uses a constant called FIELDS. It also converts each thrift field into a constant. So a field called "fields" will end up generating a constant with same name, producing the warning.

      $ cat foo.thrift
      struct Foo {
        1: list<string> fields;
      }
      $ thrift --gen rb -out . foo.thrift
      $ irb
      > require './foo_types'
      /Users/ben/code/eqm/ruby-storm-connector/foo_types.rb:13: warning: already initialized constant FIELDS
       => true
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                bensymonds Ben Symonds
              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: