summaryrefslogtreecommitdiff
path: root/test/rubygems/test_gem_safe_marshal.rb
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2023-08-24 09:57:16 -0700
committergit <svn-admin@ruby-lang.org>2023-09-20 02:03:04 +0000
commitf4a5fac0d2671ec98f50a561eefd4ca3702f7cb1 (patch)
treee34c8f18ab947f275b3a9b0600a602b89ba8f635 /test/rubygems/test_gem_safe_marshal.rb
parentcadca9f67eba9e101558aa32594646c3ece17c31 (diff)
[rubygems/rubygems] Ruby 2.6 compat
https://github.com/rubygems/rubygems/commit/1a84960af3
Diffstat (limited to 'test/rubygems/test_gem_safe_marshal.rb')
-rw-r--r--test/rubygems/test_gem_safe_marshal.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/rubygems/test_gem_safe_marshal.rb b/test/rubygems/test_gem_safe_marshal.rb
index 5a381b0107..fb272877f5 100644
--- a/test/rubygems/test_gem_safe_marshal.rb
+++ b/test/rubygems/test_gem_safe_marshal.rb
@@ -84,10 +84,12 @@ class TestGemSafeMarshal < Gem::TestCase
Time.at(secs, 1.00001, :nanosecond),
Time.at(secs, 1.00001, :nanosecond),
].tap do |times|
- times.concat [
- Time.at(secs, in: "UTC"),
- Time.at(secs, in: "Z"),
- ] unless RUBY_ENGINE == "truffleruby" && RUBY_ENGINE_VERSION < "23"
+ unless RUBY_ENGINE == "truffleruby" && RUBY_ENGINE_VERSION < "23" || RUBY_VERSION < "2.7"
+ times.concat [
+ Time.at(secs, in: "UTC"),
+ Time.at(secs, in: "Z"),
+ ]
+ end
end.each_with_index do |t, i|
define_method("test_time_#{i} #{t.inspect}") do
pend "Marshal.load of Time with custom zone is broken before Truffleruby 23" if t.zone.nil? && RUBY_ENGINE == "truffleruby" && RUBY_ENGINE_VERSION < "23"