[
https://issues.apache.org/jira/browse/THRIFT-157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12639934#action_12639934
]
Kevin Clark commented on THRIFT-157:
------------------------------------
HI Dave, both of these ideas look fine and the implementation works for me, but
as they're really two separate bugs, would you mind splitting the patch into
two issues? Sorry for the bother. I'll push them in after that.
> Ruby generator produces incorrect output for strings with single-quotes or
> for class references across namespaces
> -----------------------------------------------------------------------------------------------------------------
>
> Key: THRIFT-157
> URL: https://issues.apache.org/jira/browse/THRIFT-157
> Project: Thrift
> Issue Type: Bug
> Components: Compiler (Ruby)
> Reporter: Dave Engberg
> Attachments: t_rb_generator.cc.diff
>
>
> If I declare a constant in a Thrift iDL like this:
> const string HAMMER_TIME = "Can't touch this";
> The generated Ruby sources generate a constant like this:
> HAMMER_TIME = 'Can't touch this';
> This doesn't work because the apostrophe terminates the string constant. The
> patch replaces this with:
> HAMMER_TYPE = %q"Can't touch this";
> Which avoids the problem.
> The Ruby generator also fails to fully qualify class names when a structure
> or service in one Thrift-generated namespace references one in another
> namespace, either as a structure referenced in a structure or as an exception
> references in a service.
> The patch fixes the Ruby generator by adding a generator method to emit a
> fully qualified name, and then uses this in the two relevant places that I
> found which need it.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.