diff options
author | Patrick Plenefisch <simonpatp@gmail.com> | 2022-09-30 14:26:46 -0400 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2022-11-17 03:39:04 +0000 |
commit | e61b3e6f43434bd815577a67d4f1719091b57d5c (patch) | |
tree | 2407e534f5b3598b0d549aac7a27e65c03d37ae8 /lib | |
parent | a777ec0d85f1d52ddf531931c7457a65961f0082 (diff) | |
download | ruby-e61b3e6f43434bd815577a67d4f1719091b57d5c.tar.gz |
[ruby/irb] Fix https://github.com/ruby/irb/pull/295: Ignore Java
package reference objects in
JRuby
https://github.com/ruby/irb/commit/84d030182d
Diffstat (limited to 'lib')
-rw-r--r-- | lib/irb/completion.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/irb/completion.rb b/lib/irb/completion.rb index b41d5de35e..34640e17f9 100644 --- a/lib/irb/completion.rb +++ b/lib/irb/completion.rb @@ -361,6 +361,7 @@ module IRB to_ignore = ignored_modules ObjectSpace.each_object(Module){|m| next if (to_ignore.include?(m) rescue true) + next unless m.respond_to?(:instance_methods) # JRuby has modules that represent java packages. They don't include many common ruby methods candidates.concat m.instance_methods(false).collect{|x| x.to_s} } candidates.sort! |