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

Regression in 3.8.0: Unexpected positional argument for Time#iso8601(Integer) #2205

Closed
myronmarston opened this issue Dec 26, 2024 · 4 comments · Fixed by #2207
Closed

Regression in 3.8.0: Unexpected positional argument for Time#iso8601(Integer) #2205

myronmarston opened this issue Dec 26, 2024 · 4 comments · Fixed by #2207

Comments

@myronmarston
Copy link
Contributor

myronmarston commented Dec 26, 2024

After upgrading to RBS 3.8.0 and running steep check on my project, I'm getting a new error:

elasticgraph-indexer_lambda/lib/elastic_graph/indexer_lambda/sqs_processor.rb:110:62: [error] Unexpected positional argument
│ Diagnostic ID: Ruby::UnexpectedPositionalArgument
│
└         Time.at(seconds, millis, :millisecond).getutc.iso8601(3)

This appears to be caused by 50a15f6 as part of #2189. The definition in stdlib/time/0/time.rbs supported an ::Integer argument but the new definition in core/time.rbs does not. However, Ruby continues to support that argument:

$ ruby --version
ruby 3.4.1 (2024-12-25 revision 48d4efcb85) +PRISM [arm64-darwin24]
$ ruby -e "puts ::Time.now.iso8601(1)"
2024-12-26T10:35:51.9-08:00

For anyone else who comes across this, the workaround is pretty simple:

block/elasticgraph#67

(But I'd still like to see this fixed in RBS itself!).

@ParadoxV5
Copy link
Contributor

also #xmlshema

$ ruby -e 'puts RUBY_VERSION, Time.now.xmlschema(3)'
3.4.1
2024-12-26T11:43:18.001-07:00

@soutaro
Copy link
Member

soutaro commented Dec 27, 2024

@myronmarston thank you for reporting the issue. I'll fix the issue.

I also found I can access the repository! 😀 It can be a good example to test regression before releases.

@soutaro soutaro linked a pull request Dec 27, 2024 that will close this issue
@myronmarston
Copy link
Contributor Author

Thanks for the quick fix!

@soutaro
Copy link
Member

soutaro commented Dec 27, 2024

Released 3.8.1 with the fix. 🎉

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

Successfully merging a pull request may close this issue.

3 participants