Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ruby ≥2.7 complains about ActiveSupport's lack of explicit handling of keyworded Time.at #41375

Closed
doriantaylor opened this issue Feb 8, 2021 · 0 comments

Comments

@doriantaylor
Copy link

I'm sure we are familiar with the deprecation and eventual decommissioning of hashes as implicit keyword parameters (in 2.7 and 3, respectively). There is a formulation of Time.at(epoch, in: offset) that is hooked or wrapped or some such by ActiveSupport, which appears not to account explicitly for keyword arguments, causing the interpreter to complain.

Steps to reproduce

require 'time'
require 'active_support/time'

Time.at 31337, in: -28800
# /usr/local/lib/ruby/gems/2.7.0/gems/activesupport-6.1.1/lib/active_support/core_ext/time/calculations.rb:46: warning: Using the last argument as keyword parameters is deprecated
# => 1970-01-01 00:42:17 -0800

Expected behavior

No deprecation warning.

Actual behavior

Said deprecation warning.

System configuration

Rails version: N/A; ActiveSupport 6.1.1

Ruby version: 2.7.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant