A gem providing "time travel", "time freezing", and "time acceleration" capabilities, making it simple to test time-dependent code. It provides a unified method to mock Time.now, Date.today, and DateTime.now in a single call.
This means the monkey patch here will break in newer Ruby versions, because Ruby now requires keyword arguments be handled separately from other arguments.
Solution
Check if ruby2_keywords is defined (Ruby 2.7+), and use it if it is, which will force the previous behavior.
Problem
As of https://github.com/ruby/ruby/pull/4010,
Time.new
now accepts an optional keyword argument.This means the monkey patch here will break in newer Ruby versions, because Ruby now requires keyword arguments be handled separately from other arguments.
Solution
Check if
ruby2_keywords
is defined (Ruby 2.7+), and use it if it is, which will force the previous behavior.