diff options
author | Dmitry Gutov <dgutov@yandex.ru> | 2016-12-13 23:46:28 +0200 |
---|---|---|
committer | Dmitry Gutov <dgutov@yandex.ru> | 2016-12-13 23:46:28 +0200 |
commit | 707a6e7d6281adffc1fff42fa91c7ed36723878e (patch) | |
tree | c7c1a84aac9e5214fe278c6a2c74c89f61280164 | |
parent | 6a29ed8342f7c05faf22607273863adb7d2bc4ff (diff) | |
download | pry-707a6e7d6281adffc1fff42fa91c7ed36723878e.tar.gz |
Work around an unexpected success under JRuby
-rw-r--r-- | spec/completion_spec.rb | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/spec/completion_spec.rb b/spec/completion_spec.rb index 473bf910..58a193c9 100644 --- a/spec/completion_spec.rb +++ b/spec/completion_spec.rb @@ -225,15 +225,18 @@ describe Pry::InputCompleter do 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) + if !Pry::Helpers::BaseHelpers.jruby? + # Classes that override .hash are still hashable in JRuby, for some reason. + 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 - def aaaa - end + completer_test(self, nil, false).call("[].size.aaaa") end - - completer_test(self, nil, false).call("[].size.aaaa") end end |