Skip to content

No way to execute method with empty params when field with the same name is present #105

@uvlad7

Description

@uvlad7

So, I have java class

public class Test {
    public String test;

    public Test(String test) {
        this.test = test;
    }

    public String test() {
        return "method_" + this.test;
    }
}

and I can't call test() even with _invoke

3.0.2 :011 > Test.new("test").test
 => "test" 
3.0.2 :012 > Test.new("test")._invoke(:test)
 => "test" 

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.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions