diff --git a/library/ipaddr/operator_spec.rb b/library/ipaddr/operator_spec.rb index 3f54efd486..2647b2c205 100644 --- a/library/ipaddr/operator_spec.rb +++ b/library/ipaddr/operator_spec.rb @@ -57,6 +57,13 @@ @a.should_not == IPAddr.new("3ffe:505:3::") end + ruby_version_is '2.4' do + # https://bugs.ruby-lang.org/issues/12799 + it "tests for equality correctly if object cannot be converted to IPAddr" do + IPAddr.new("1.1.1.1").should_not == "sometext" + end + end + it "sets a mask" do a = @a.mask(32) a.to_s.should == "3ffe:505::"