Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

become_java! does not respect superclass (methods) #4670

Closed
HeikoBornholdt opened this issue Jun 14, 2017 · 3 comments
Closed

become_java! does not respect superclass (methods) #4670

HeikoBornholdt opened this issue Jun 14, 2017 · 3 comments

Comments

@HeikoBornholdt
Copy link

I've got the ruby classes Foo & Barand want to generate the corresponding java class with become_java!:

class Foo
  def foo
    puts 'Hello foo'
  end
end

class Bar < Foo
  def bar
    puts 'Hello bar'
  end
end

cls = Bar.become_java!
cls.declared_methods.each do |method|
  puts method.name
end

Expected Behavior (ruby script output)

foo
bar
clinit

Actual Behavior (ruby script output)

bar
clinit

(foo is missing)

Environment

$ ruby -v
jruby 9.1.7.0 (2.3.1) 2017-01-11 68056ae Java HotSpot(TM) 64-Bit Server VM 25.60-b23 on 1.8.0_60-b27 +jit [darwin-x86_64]

$ echo $JRUBY_OPTS
$
@headius
Copy link
Member

headius commented Jun 14, 2017

I don't think this has ever worked, has it?

@HeikoBornholdt
Copy link
Author

I'm new to jruby, so I can't answer this question.

Does someone know a workaround to call foo in Java?

@Overbryd
Copy link

Might be related: #5571

@enebo enebo added this to the Invalid or Duplicate milestone Sep 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants