ruby-changes:72858
From: Nobuyoshi <ko1@a...>
Date: Mon, 8 Aug 2022 23:49:43 +0900 (JST)
Subject: [ruby-changes:72858] e0dfa5967e (master): [Bug #18946] Use Gregorian dates to test
https://git.ruby-lang.org/ruby.git/commit/?id=e0dfa5967e From e0dfa5967e7063da8b65dc3c062ef4652e246e34 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Mon, 8 Aug 2022 23:08:29 +0900 Subject: [Bug #18946] Use Gregorian dates to test --- spec/ruby/library/datetime/to_time_spec.rb | 4 ++-- spec/ruby/library/time/to_datetime_spec.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/ruby/library/datetime/to_time_spec.rb b/spec/ruby/library/datetime/to_time_spec.rb index a11b6e30e1..a03ab67867 100644 --- a/spec/ruby/library/datetime/to_time_spec.rb +++ b/spec/ruby/library/datetime/to_time_spec.rb @@ -7,10 +7,10 @@ describe "DateTime#to_time" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/library/datetime/to_time_spec.rb#L7 end it "returns a Time representing the same instant" do - datetime = DateTime.civil(3, 12, 31, 23, 58, 59) + datetime = DateTime.civil(2012, 12, 31, 23, 58, 59) time = datetime.to_time.utc - time.year.should == 3 + time.year.should == 2012 time.month.should == 12 time.day.should == 31 time.hour.should == 23 diff --git a/spec/ruby/library/time/to_datetime_spec.rb b/spec/ruby/library/time/to_datetime_spec.rb index 0e37a61108..2c1e060f0f 100644 --- a/spec/ruby/library/time/to_datetime_spec.rb +++ b/spec/ruby/library/time/to_datetime_spec.rb @@ -3,9 +3,9 @@ require 'time' https://github.com/ruby/ruby/blob/trunk/spec/ruby/library/time/to_datetime_spec.rb#L3 describe "Time#to_datetime" do it "returns a DateTime representing the same instant" do - time = Time.utc(3, 12, 31, 23, 58, 59) + time = Time.utc(2012, 12, 31, 23, 58, 59) datetime = time.to_datetime - datetime.year.should == 3 + datetime.year.should == 2012 datetime.month.should == 12 datetime.day.should == 31 datetime.hour.should == 23 -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/