Runtime assertions for Ruby literal.fun
ruby
5
fork

Configure Feed

Select the types of activity you want to include in your feed.

Don’t test time zone in JRuby

JRuby Time objects don’t respond to `zone`.

+3 -1
+3 -1
test/types.test.rb
··· 632 632 refute _Time(_Interface(:non_existing_method)) === current_time 633 633 refute _Time(current_time..) === current_time - 60 634 634 635 - assert _Time(zone: "UTC") === Time.new(2025, 1, 13, 20, 0, 0, "UTC") 635 + unless RUBY_ENGINE == "jruby" 636 + assert _Time(zone: "UTC") === Time.new(2025, 1, 13, 20, 0, 0, "UTC") 637 + end 636 638 637 639 fifteen_mins_ago = proc { |t| ((Time.now - (60 * 15))..(Time.now)) === t } 638 640 assert _Time(fifteen_mins_ago) === Time.now - (60 * 10)