diff options
author | Jean Boussier <jean.boussier@gmail.com> | 2019-10-24 11:10:57 +0200 |
---|---|---|
committer | Jean Boussier <jean.boussier@gmail.com> | 2020-03-20 13:33:39 +0100 |
commit | b77ac183d8088560e60303c3c9db222d381f3739 (patch) | |
tree | 124951ae4b40ff261e22b7027a763bc3e79b5476 /spec | |
parent | 62dbbdb23eb4e2d84d95ebd1261cdf23facacaed (diff) | |
download | pry-b77ac183d8088560e60303c3c9db222d381f3739.tar.gz |
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
Diffstat (limited to 'spec')
-rw-r--r-- | spec/completion_spec.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 |