aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/ruby/core/array/pack/shared/float.rb16
1 files changed, 12 insertions, 4 deletions
diff --git a/spec/ruby/core/array/pack/shared/float.rb b/spec/ruby/core/array/pack/shared/float.rb
index 6fc3b6b359..b9864adef5 100644
--- a/spec/ruby/core/array/pack/shared/float.rb
+++ b/spec/ruby/core/array/pack/shared/float.rb
@@ -42,7 +42,7 @@ describe :array_pack_float_le, shared: true do
end
it "encodes NaN" do
- nans = ["\x00\x00\xc0\xff", "\x00\x00\xc0\x7f"]
+ nans = ["\x00\x00\xc0\xff", "\x00\x00\xc0\x7f", "\xFF\xFF\xFF\x7F"]
nans.should include([nan_value].pack(pack_format))
end
@@ -97,7 +97,7 @@ describe :array_pack_float_be, shared: true do
end
it "encodes NaN" do
- nans = ["\xff\xc0\x00\x00", "\x7f\xc0\x00\x00"]
+ nans = ["\xff\xc0\x00\x00", "\x7f\xc0\x00\x00", "\x7F\xFF\xFF\xFF"]
nans.should include([nan_value].pack(pack_format))
end
@@ -152,7 +152,11 @@ describe :array_pack_double_le, shared: true do
end
it "encodes NaN" do
- nans = ["\x00\x00\x00\x00\x00\x00\xf8\xff", "\x00\x00\x00\x00\x00\x00\xf8\x7f"]
+ nans = [
+ "\x00\x00\x00\x00\x00\x00\xf8\xff",
+ "\x00\x00\x00\x00\x00\x00\xf8\x7f",
+ "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x7F"
+ ]
nans.should include([nan_value].pack(pack_format))
end
@@ -207,7 +211,11 @@ describe :array_pack_double_be, shared: true do
end
it "encodes NaN" do
- nans = ["\xff\xf8\x00\x00\x00\x00\x00\x00", "\x7f\xf8\x00\x00\x00\x00\x00\x00"]
+ nans = [
+ "\xff\xf8\x00\x00\x00\x00\x00\x00",
+ "\x7f\xf8\x00\x00\x00\x00\x00\x00",
+ "\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
+ ]
nans.should include([nan_value].pack(pack_format))
end