Skip to content

Fix a naming conflict jrubyc can introduce in generated java.#894

Merged
headius merged 1 commit intojruby:masterfrom
phs:phs/issue-812-jrubyc-variable-ruby_result-is-already-defined
Jul 24, 2013
Merged

Fix a naming conflict jrubyc can introduce in generated java.#894
headius merged 1 commit intojruby:masterfrom
phs:phs/issue-812-jrubyc-variable-ruby_result-is-already-defined

Conversation

@phs
Copy link
Contributor

@phs phs commented Jul 18, 2013

A ruby argument named result will conflict with the stack local used for the return value: both will become ruby_result in java.

Namespace arguments away from this by prefixing them with ruby_arg_ instead of merely ruby_.

See #812

A ruby argument named 'result' will conflict with the stack local used for the return value: both will become 'ruby_result' in java.  Namespace arguments away from this by prefixing them with 'ruby_arg_' instead of merely 'ruby_'.

See #812
@enebo
Copy link
Member

enebo commented Jul 18, 2013

Won't an argument named 'arg_result' still have the same issue? Not saying this isn't an improvement due to likelihood...

@phs
Copy link
Contributor Author

phs commented Jul 18, 2013

A ruby argument named arg_result should lead to a java local named ruby_arg_arg_result, which would still be different from the implicit ruby_result java local.

headius added a commit that referenced this pull request Jul 24, 2013
…esult-is-already-defined

Fix a naming conflict jrubyc can introduce in generated java.
@headius headius merged commit 8135012 into jruby:master Jul 24, 2013
@phs phs deleted the phs/issue-812-jrubyc-variable-ruby_result-is-already-defined branch January 9, 2014 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants