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

Time::at fails when when passing kwargs as second argument #2219

Open
b-n opened this issue Oct 16, 2022 · 0 comments
Open

Time::at fails when when passing kwargs as second argument #2219

b-n opened this issue Oct 16, 2022 · 0 comments
Labels
A-ruby-core Area: Ruby Core types. B-mruby Backend: Implementation of artichoke-core using mruby. C-bug Category: This is a bug.

Comments

@b-n
Copy link
Member

b-n commented Oct 16, 2022

I recently discovered this was breaking in airb:

>>> Time.at(1, in: "Z")
Traceback (most recent call last):
	2: from (airb):1
	1: from (airb):1:in at
TypeError (no implicit conversion of Hash into Integer)

This should work:

[3.1.2] > Time.at(1, in: "Z")
=> 1970-01-01 00:00:01 UTC

I suspect this is somewhere in here: https://github.com/artichoke/artichoke/blob/trunk/artichoke-backend/src/extn/core/time/trampoline.rs#L74-L96

Also, it feels like this was already a work around for dealing with #2091. Preference would be to fix #2091, which should hopefully enable the refactor of this code to be a lot more sensible.

@b-n b-n added C-bug Category: This is a bug. A-ruby-core Area: Ruby Core types. B-mruby Backend: Implementation of artichoke-core using mruby. labels Oct 16, 2022
@b-n b-n changed the title Time::at fails when when passing kwargs as second Time::at fails when when passing kwargs as second argument Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ruby-core Area: Ruby Core types. B-mruby Backend: Implementation of artichoke-core using mruby. C-bug Category: This is a bug.
Development

No branches or pull requests

1 participant