From b77ac183d8088560e60303c3c9db222d381f3739 Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Thu, 24 Oct 2019 11:10:57 +0200 Subject: Fix completion_spec on MRI 2.7.0 The spec was failing because on 2.7 hash directly return nil without hashing the key if they are empty: ```ruby m = Module.new do def self.hash; end end h = {} h[m] # => nil h[1] = 2 h[m] # => ArgumentError ``` So we need to require IRB so that the to_ignore set isn't empty --- spec/completion_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'spec') diff --git a/spec/completion_spec.rb b/spec/completion_spec.rb index 5df577f5..86aa41b5 100644 --- a/spec/completion_spec.rb +++ b/spec/completion_spec.rb @@ -239,7 +239,7 @@ describe Pry::InputCompleter do unless Pry::Helpers::Platform.jruby? # Classes that override .hash are still hashable in JRuby, for some reason. it 'ignores methods from modules that override Object#hash incompatibly' do - # skip unless Pry::Helpers::Platform.jruby? + require 'irb' m = Module.new do def self.hash; end -- cgit v1.2.1