[
https://issues.apache.org/jira/browse/THRIFT-1916?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dmytro Shteflyuk reassigned THRIFT-1916:
----------------------------------------
Assignee: Dmytro Shteflyuk
> Compiled ruby code generates warning if field with name "fields" is present
> ---------------------------------------------------------------------------
>
> Key: THRIFT-1916
> URL: https://issues.apache.org/jira/browse/THRIFT-1916
> Project: Thrift
> Issue Type: Bug
> Components: Ruby - Compiler
> Affects Versions: 0.9
> Reporter: Ben Symonds
> Assignee: Dmytro Shteflyuk
> Priority: Major
>
> 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.
> {code}
> $ 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
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)