Skip to content

java_signature not honored at runtime become_java! #3366

@byteit101

Description

@byteit101

On both 1.7.19 and 9.0.1.0:

require 'jruby/core_ext'

class RubyClz
  java_signature "void hello(javafx.event.Event)"
  def goodbye(e)
    puts "I was called!"
  end
end
RubyClz.become_java!
p RubyClz.java_class.methods.sort{|a, b| a.name <=> b.name }.find_all{|x| x.to_s.include? "hello" or x.to_s.include? "goodby"}.map(&:to_s)
# ["public org.jruby.runtime.builtin.IRubyObject rubyobj.RubyClz.goodbye(org.jruby.runtime.builtin.IRubyObject[])"] instead of ["public void hello(javafx.event.Event)"]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions