File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ def canonicalize!
4343 # Can't use simple %f transformation due to special requirements from
4444 # N3 tests in representation
4545 @string = case
46+ when @object . nil? then 'NaN'
4647 when @object . nan? then 'NaN'
4748 when @object . infinite? then @object . to_s [ 0 ...-'inity' . length ] . upcase
4849 when @object . zero? then '0.0E0'
Original file line number Diff line number Diff line change @@ -615,8 +615,8 @@ def self.literals(*selector)
615615 %w( -INF -INF ) ,
616616 %w( +INF INF ) ,
617617 #%w(NaN NaN),
618- #%w(NAN NaN),
619- %w( InF INF ) ,
618+ #%w(NAN NaN),
619+ %w( InF INF ) ,
620620 %w( 3E1 3.0E1 )
621621 ]
622622 it_behaves_like 'RDF::Literal validation' , RDF ::XSD . double ,
@@ -641,7 +641,7 @@ def self.literals(*selector)
641641 1.0 => [ "1.0" , "1.0E0" ] ,
642642 0.0 => [ "0.0" , "0.0E0" ] ,
643643 10.10 => [ "10.1" , "1.01E1" ] ,
644- 123.456e4 => [ "1234560.0" , "1.23456E6" ] ,
644+ 123.456e4 => [ "1234560.0" , "1.23456E6" ]
645645 } . each do |obj , ( str , canon ) |
646646 it "to_str #{ obj } to #{ str . inspect } " do
647647 expect ( RDF ::Literal ::Double . new ( obj ) . to_s ) . to eql str
You can’t perform that action at this time.
0 commit comments