1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

Really ignore old Argon2::Password and the like in the methods scan

This commit is contained in:
Dmitry Gutov 2016-12-12 13:54:55 +02:00
parent 67a497fa1c
commit 6a29ed8342
2 changed files with 13 additions and 1 deletions

View file

@ -170,7 +170,7 @@ class Pry::InputCompleter
candidates = []
to_ignore = ignored_modules
ObjectSpace.each_object(Module){|m|
next if to_ignore.include?(m) rescue true
next if (to_ignore.include?(m) rescue true)
# jruby doesn't always provide #instance_methods() on each
# object.

View file

@ -224,4 +224,16 @@ describe Pry::InputCompleter do
require 'irb'
completer_test(self, nil, false).call("[].size.parse_printf_format")
end
it 'ignores methods from modules that override Object#hash incompatibly' do
_m = Module.new do
def self.hash(a, b)
end
def aaaa
end
end
completer_test(self, nil, false).call("[].size.aaaa")
end
end