summaryrefslogtreecommitdiff
path: root/spec/ruby/core/time
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2020-02-28 19:07:17 +0100
committerBenoit Daloze <eregontp@gmail.com>2020-02-28 19:07:17 +0100
commita0f5ff4c3cd05f8717be2bf1d79f0817f288d398 (patch)
tree441f409cf816cf8a61dacdbaf204ae9f5cbe2f18 /spec/ruby/core/time
parent5d210501825e1682e68cbfc2be424fc339f382fa (diff)
Update to ruby/spec@41bf282
Diffstat (limited to 'spec/ruby/core/time')
-rw-r--r--spec/ruby/core/time/ceil_spec.rb7
-rw-r--r--spec/ruby/core/time/floor_spec.rb7
2 files changed, 8 insertions, 6 deletions
diff --git a/spec/ruby/core/time/ceil_spec.rb b/spec/ruby/core/time/ceil_spec.rb
index 29dcec5d72..86029554db 100644
--- a/spec/ruby/core/time/ceil_spec.rb
+++ b/spec/ruby/core/time/ceil_spec.rb
@@ -36,10 +36,11 @@ ruby_version_is "2.7" do
it "copies own timezone to the returning value" do
@time.zone.should == @time.ceil.zone
- with_timezone "JST-9" do
- time = Time.at 0, 1
- time.zone.should == time.ceil.zone
+ time = with_timezone "JST-9" do
+ Time.at 0, 1
end
+
+ time.zone.should == time.ceil.zone
end
end
end
diff --git a/spec/ruby/core/time/floor_spec.rb b/spec/ruby/core/time/floor_spec.rb
index 763ed1ba51..a19585b787 100644
--- a/spec/ruby/core/time/floor_spec.rb
+++ b/spec/ruby/core/time/floor_spec.rb
@@ -28,10 +28,11 @@ ruby_version_is "2.7" do
it "copies own timezone to the returning value" do
@time.zone.should == @time.floor.zone
- with_timezone "JST-9" do
- time = Time.at 0, 1
- time.zone.should == time.floor.zone
+ time = with_timezone "JST-9" do
+ Time.at 0, 1
end
+
+ time.zone.should == time.floor.zone
end
end
end