[前][次][番号順一覧][スレッド一覧]

ruby-changes:54834

From: eregon <ko1@a...>
Date: Tue, 12 Feb 2019 06:57:32 +0900 (JST)
Subject: [ruby-changes:54834] eregon:r67052 (trunk): Accept a third value for NaNs, as produced by the Sun Studio C Compiler

eregon	2019-02-12 06:57:10 +0900 (Tue, 12 Feb 2019)

  New Revision: 67052

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=67052

  Log:
    Accept a third value for NaNs, as produced by the Sun Studio C Compiler
    
    * See http://rubyci.s3.amazonaws.com/solaris11s-sunc/ruby-trunk/log/20190211T142523Z.fail.html.gz

  Modified files:
    trunk/spec/ruby/core/array/pack/shared/float.rb
Index: spec/ruby/core/array/pack/shared/float.rb
===================================================================
--- spec/ruby/core/array/pack/shared/float.rb	(revision 67051)
+++ spec/ruby/core/array/pack/shared/float.rb	(revision 67052)
@@ -42,7 +42,7 @@ describe :array_pack_float_le, shared: t https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/array/pack/shared/float.rb#L42
   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: t https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/array/pack/shared/float.rb#L97
   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: https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/array/pack/shared/float.rb#L152
   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: https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/array/pack/shared/float.rb#L211
   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
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]