summaryrefslogtreecommitdiff
path: root/spec/ruby/core/array/pack/shared/float.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/array/pack/shared/float.rb')
-rw-r--r--spec/ruby/core/array/pack/shared/float.rb18
1 files changed, 13 insertions, 5 deletions
diff --git a/spec/ruby/core/array/pack/shared/float.rb b/spec/ruby/core/array/pack/shared/float.rb
index 9510cffed7..76c800b74d 100644
--- a/spec/ruby/core/array/pack/shared/float.rb
+++ b/spec/ruby/core/array/pack/shared/float.rb
@@ -1,4 +1,4 @@
-# -*- encoding: binary -*-
+# encoding: binary
describe :array_pack_float_le, shared: true do
it "encodes a positive Float" do
@@ -27,7 +27,9 @@ describe :array_pack_float_le, shared: true do
ruby_version_is ""..."3.3" do
it "ignores NULL bytes between directives" do
- [5.3, 9.2].pack(pack_format("\000", 2)).should == "\x9a\x99\xa9@33\x13A"
+ suppress_warning do
+ [5.3, 9.2].pack(pack_format("\000", 2)).should == "\x9a\x99\xa9@33\x13A"
+ end
end
end
@@ -105,7 +107,9 @@ describe :array_pack_float_be, shared: true do
ruby_version_is ""..."3.3" do
it "ignores NULL bytes between directives" do
- [5.3, 9.2].pack(pack_format("\000", 2)).should == "@\xa9\x99\x9aA\x1333"
+ suppress_warning do
+ [5.3, 9.2].pack(pack_format("\000", 2)).should == "@\xa9\x99\x9aA\x1333"
+ end
end
end
@@ -175,7 +179,9 @@ describe :array_pack_double_le, shared: true do
ruby_version_is ""..."3.3" do
it "ignores NULL bytes between directives" do
- [5.3, 9.2].pack(pack_format("\000", 2)).should == "333333\x15@ffffff\x22@"
+ suppress_warning do
+ [5.3, 9.2].pack(pack_format("\000", 2)).should == "333333\x15@ffffff\x22@"
+ end
end
end
@@ -244,7 +250,9 @@ describe :array_pack_double_be, shared: true do
ruby_version_is ""..."3.3" do
it "ignores NULL bytes between directives" do
- [5.3, 9.2].pack(pack_format("\000", 2)).should == "@\x15333333@\x22ffffff"
+ suppress_warning do
+ [5.3, 9.2].pack(pack_format("\000", 2)).should == "@\x15333333@\x22ffffff"
+ end
end
end