You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
because invoke_by_instance checks if getter should be called simply by checking if argc == 0 (if that field exists), I think it should have an additional bool parameter to skip getter if it's called from rjb_i_invoke.
The text was updated successfully, but these errors were encountered:
First, I assume, _invoke was added to call methods with names that are not valid ruby names, but it could be used the same fuels, and now there's no way to access a field names end, for example. So, I assume something like _field (set if arity 2, get if 1) or _set_field/_get_field is required.
Second, is it really a good idea to silently resolve this ambiguity, maybe it's better to raise an exception and force programmer to use an explicit way?
Even if so, I believe it's more expected for rubyists to prefer a method over a field. I mean, we often replace
attr_reader:something
with
defsomethingdo_something_additional@somethingend
and it works as public interface doesn't change, so one may expect things to work the same way if they add something() in Java. l didn't check if making something non-public helps, but we don't always can change the interface, anyway
So, I have java class
and I can't call
test()
even with_invoke
because
invoke_by_instance
checks if getter should be called simply by checking ifargc == 0
(if that field exists), I think it should have an additional bool parameter to skip getter if it's called fromrjb_i_invoke
.The text was updated successfully, but these errors were encountered: