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

Merged
merged 1 commit into from Jul 24, 2013

Projects

None yet

3 participants

@phs
Contributor
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

@phs phs 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
095d147
@enebo
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
Contributor
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 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