Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.6RC3
-
Fix Version/s: JRuby 1.6.1
-
Component/s: None
-
Labels:None
-
Environment:windows 7
-
Number of attachments :
Description
Completion works when pressing tabulator key with irb (1.8.7).exe.
Welcome to the JRuby IRB Console [1.6.0.RC3 (1.8.7)] >> import "javax.swing.JComboBox" => Java::JavaxSwing::JComboBox >> JComboBox.new.model.
Completion doesn't work when pressing tabulator key with irb (1.9.2).exe.
Welcome to the JRuby IRB Console [1.6.0.RC3 (1.9.2)] Switch to inspect mode. >> import "javax.swing.JComboBox" => Java::JavaxSwing::JComboBox >> JComboBox.new.model.
Here's the stack trace I get when I run the IRB Console (org.jruby.demo.IRBConsole) with Ruby 1.9 support within my application.
Exception in thread "AWT-EventQueue-0" org.jruby.exceptions.RaiseException: (TypeError) can't convert Module into String at #<Class:0x100e3572b>.(class InputCompletor)(file:/D:/jruby-complete-1.6.0.RC3.jar!/META-INF/jruby.home/lib/ruby/1.9/irb/completion.rb:160) at org.jruby.RubyObjectSpace.each_object(org/jruby/RubyObjectSpace.java:167) at #<Class:0x100e3572b>.(class InputCompletor)(file:/D:/jruby-complete-1.6.0.RC3.jar!/META-INF/jruby.home/lib/ruby/1.9/irb/completion.rb:154) at org.jruby.RubyProc.call(org/jruby/RubyProc.java:256)
Ahh, we have patched this before for 1.8. The problem is that while walking all Modules, it hits our package modules. They are entirely method_missing-driven, and .name returns the subpackage rather than a string.
Fixing.