'cannot find symbol' if function def has more than 3 arguments
--------------------------------------------------------------
Key: JRUBY-5011
URL: http://jira.codehaus.org/browse/JRUBY-5011
Project: JRuby
Issue Type: Bug
Affects Versions: JRuby 1.5.1
Environment: jdk VM 1.6.0_21 (both mac and linux)
Reporter: Audrey Lee
Assignee: Thomas E Enebo
I added a 4th argument to method: my_func()
I see this:
a...@z2:/pt/z2/api$
a...@z2:/pt/z2/api$ cat my_class.rb
#!/usr/bin/env jruby
# my_class.rb
require 'java'
class MyClass
def my_fnc(a, b, c, d)
end
end
a...@z2:/pt/z2/api$
a...@z2:/pt/z2/api$
a...@z2:/pt/z2/api$ jrubyc --javac my_class.rb
Generating Java class MyClass to /pt/z2/api/MyClass.java
javac -d /pt/z2/api -cp /pt/z2/jruby151/lib/jruby.jar:. /pt/z2/api/MyClass.java
/pt/z2/api/MyClass.java:75: cannot find symbol
symbol : method
invoke(org.jruby.runtime.ThreadContext,MyClass,java.lang.String,org.jruby.runtime.builtin.IRubyObject,org.jruby.runtime.builtin.IRubyObject,org.jruby.runtime.builtin.IRubyObject,org.jruby.runtime.builtin.IRubyObject)
location: class org.jruby.javasupport.util.RuntimeHelpers
IRubyObject ruby_result =
RuntimeHelpers.invoke(__ruby__.getCurrentContext(), this, "my_fnc",
ruby_a, ruby_b, ruby_c, ruby_d);
^
1 error
a...@z2:/pt/z2/api$
a...@z2:/pt/z2/api$
Error goes away if I replace
def my_fnc(a, b, c, d)
with
def my_fnc(a, b, c)
I'm a newb so it would take me an afternoon to figure out and then add junit
test case.
I hope my screen dump is good-nuf.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email