[JIRA] Created: (RUBY2JAVA-3) signature(:initialize, ...) should create a constructor
- From: "automatthew (JIRA)" <jira-no-reply@kenai.com>
- To: issues@ruby2java.kenai.com
- Subject: [JIRA] Created: (RUBY2JAVA-3) signature(:initialize, ...) should create a constructor
- Date: Tue, 17 Nov 2009 20:49:28 +0000 (GMT+00:00)
signature(:initialize, ...) should create a constructor
-------------------------------------------------------
Key: RUBY2JAVA-3
URL: http://kenai.com/jira/browse/RUBY2JAVA-3
Project: ruby2java
Issue Type: New Feature
Reporter: automatthew
Given a Ruby class with an #initialize that takes an argument:
{code:none|title=Smurf.rb}
class Smurf
def initialize(name)
@name = name
end
def smurf(string)
puts "#{@name || "A"} Smurf is #{string}"
end
if defined? Ruby2Java
signature :initialize, [java.lang.String] => Java::void
signature :smurf, [java.lang.String] => Java::void
end
end
{code}
{code:title=SmurfTest.java}
public class SmurfTest {
public static void main(String[] args) {
Smurf brawny = new Smurf("Brawny");
brawny.smurf("smurfy");
}
}
{code}
Running SmurfTest.main() produces this error:
{code}
SmurfTest.java:3: cannot find symbol
symbol : constructor Smurf(java.lang.String)
location: class Smurf
Smurf brawny = new Smurf("Brawny");
^
1 error
{code}
Adding a signature for :initialize should cause a constructor method to be
created.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://kenai.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|
[JIRA] Created: (RUBY2JAVA-3) signature(:initialize, ...) should create a constructor |
automatthew (JIRA) | 11/17/2009 |
|
[JIRA] Issue Comment Edited: (RUBY2JAVA-3) signature(:initialize, ...) should create a constructor |
automatthew (JIRA) | 11/17/2009 |
|
[JIRA] Updated: (RUBY2JAVA-3) signature(:initialize, ...) should create a constructor |
automatthew (JIRA) | 11/17/2009 |
|
[JIRA] Assigned: (RUBY2JAVA-3) signature(:initialize, ...) should create a constructor |
automatthew (JIRA) | 11/24/2009 |
|
[JIRA] Resolved: (RUBY2JAVA-3) signature(:initialize, ...) should create a constructor |
automatthew (JIRA) | 11/25/2009 |





