You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
jruby-1.7.21 :002 > class Bar
jruby-1.7.21 :003?> end
=> nil
jruby-1.7.21 :004 > class Foo
jruby-1.7.21 :005?> class << self
jruby-1.7.21 :006?> def hello
jruby-1.7.21 :007?> return 'lol'
jruby-1.7.21 :008?> end
jruby-1.7.21 :009?> end
jruby-1.7.21 :010?> end
=> nil
jruby-1.7.21 :011 > class WithSig
jruby-1.7.21 :012?> java_signature 'void hello'
jruby-1.7.21 :013?> def hello
jruby-1.7.21 :014?> puts 'lol'
jruby-1.7.21 :015?> end
jruby-1.7.21 :016?> end
Java::OrgJrubyParser::ParserSyntaxException: syntax error, unexpected end-of-file
from java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:497)
from RUBY.parse(/home/tyler/.rvm/rubies/jruby-1.7.21/lib/ruby/shared/jruby/compiler/java_signature.rb:82)
from RUBY.java_signature(/home/tyler/.rvm/rubies/jruby-1.7.21/lib/ruby/shared/jruby/core_ext/class.rb:43)
from RUBY.WithSig((irb):12)
from RUBY.evaluate((irb):11)
from org.jruby.RubyKernel.eval(org/jruby/RubyKernel.java:1079)
from org.jruby.RubyKernel.loop(org/jruby/RubyKernel.java:1479)
from org.jruby.RubyKernel.catch(org/jruby/RubyKernel.java:1242)
from org.jruby.RubyKernel.catch(org/jruby/RubyKernel.java:1242)
from home.tyler.$_dot_rvm.rubies.jruby_minus_1_dot_7_dot_21.bin.irb.(root)(/home/tyler/.rvm/rubies/jruby-1.7.21/bin/irb:13)
from home.tyler.$_dot_rvm.rubies.jruby_minus_1_dot_7_dot_21.bin.irb.(root)(home/tyler/$_dot_rvm/rubies/jruby_minus_1_dot_7_dot_21/bin//home/tyler/.rvm/rubies/jruby-1.7.21/bin/irb:13)
jruby-1.7.21 :017 >
The text was updated successfully, but these errors were encountered:
it needs the looks of a "valid" Java method signature ... () are required to be present (at the moment): class WithSig; java_signature 'void hello()'; def hello; end; end ... works as expected
marking as an enhancement only - if anyone believes the () requirement can be relaxed ... and does it
The text was updated successfully, but these errors were encountered: