-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix #105 add extra parameter to invoke_by_instance if it was called b…
…y _invoke => 1 or missing => 0 to check field or non argument method (reported and designed by uvlad7)
- Loading branch information
akiot
committed
May 1, 2024
1 parent
91c354d
commit 9f64bdf
Showing
4 changed files
with
51 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package jp.co.infoseek.hp.arton.rjb; | ||
public class Test105 { | ||
public String test; | ||
public Test105(String test) { | ||
this.test = test; | ||
} | ||
public String test() { | ||
return "method_" + test; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
begin | ||
require 'rjb' | ||
rescue LoadError | ||
require 'rubygems' | ||
require 'rjb' | ||
end | ||
require 'test/unit' | ||
|
||
class Test105 < Test::Unit::TestCase | ||
include Rjb | ||
def setup | ||
Rjb::load('.') | ||
@test105 = import('jp.co.infoseek.hp.arton.rjb.Test105') | ||
end | ||
|
||
def test_field | ||
test = @test105.new('xyz') | ||
assert_equal('xyz', test.test) | ||
end | ||
|
||
def test_method | ||
test = @test105.new('xyz') | ||
ret = test._invoke('test') | ||
assert_equal('method_xyz', ret) | ||
end | ||
end | ||
|
||
|