From 0a011efc32797d1be09bd83ff680e8103e67ac62 Mon Sep 17 00:00:00 2001 From: Holger Just Date: Thu, 2 Feb 2017 17:55:04 +0100 Subject: [PATCH] Don't rely on nil being frozen in tests Turns out, in JRuby 9.1, nil is not frozen. In all other supported Rubies, `nil.frozen?` is true. --- spec/rackstash/fields/abstract_collection_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/rackstash/fields/abstract_collection_spec.rb b/spec/rackstash/fields/abstract_collection_spec.rb index 95ad457..c6bc82f 100644 --- a/spec/rackstash/fields/abstract_collection_spec.rb +++ b/spec/rackstash/fields/abstract_collection_spec.rb @@ -254,9 +254,9 @@ describe Rackstash::Fields::AbstractCollection do end it 'normalizes values to frozen UTF-8 strings' do - array = [1, :two, 'three', nil] + array = [1, :two, 'three'] - expect(normalize(array, wrap: false)).to eql [1, 'two', 'three', nil] + expect(normalize(array, wrap: false)).to eql [1, 'two', 'three'] expect(normalize(array, wrap: false)).to all be_frozen end