Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Conversation

Projects
None yet
3 participants
@phs
Copy link
Contributor

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

Fix a naming conflict jrubyc can introduce in generated java.
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

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link
Contributor Author

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

Merge pull request #894 from phs/phs/issue-812-jrubyc-variable-ruby_r…
…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

1 check passed

default The Travis CI build passed
Details

@phs phs deleted the phs:phs/issue-812-jrubyc-variable-ruby_result-is-already-defined branch Jan 9, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.