Skip to content

Handle and clear kwargs to Dir#[] and glob#9284

Closed
headius wants to merge 1 commit intojruby:jruby-10.0from
headius:dir_glob_handle_kwargs
Closed

Handle and clear kwargs to Dir#[] and glob#9284
headius wants to merge 1 commit intojruby:jruby-10.0from
headius:dir_glob_handle_kwargs

Conversation

@headius
Copy link
Copy Markdown
Member

@headius headius commented Mar 3, 2026

Fixes #9281

@headius headius added this to the JRuby 10.0.4.0 milestone Mar 3, 2026
@headius headius force-pushed the dir_glob_handle_kwargs branch from f095a25 to 3cbba73 Compare March 3, 2026 18:22
// returns null (no kwargs present), "" kwargs but no base key, "something" kwargs with base key (which might be "").
private static void globOptions(ThreadContext context, IRubyObject[] args, String[] keys, GlobOptions options) {
Ruby runtime = context.runtime;
int callInfo = ThreadContext.resetCallInfo(context);
Copy link
Copy Markdown
Member

@kares kares Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dir.glob was really just a demonstration of the issue,

there's still a bunch of ThreadContext.resetCallInfo in other places.

should those be reviewed as well?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kares Case-by-case basic I suppose. Any place that declares it takes kwargs but doesn't reset callInfo is broken.

headius added a commit to headius/jruby that referenced this pull request Mar 3, 2026
This is the trivial fix for jruby#9281. A separate PR in
jruby#9284 did not correctly untangle the kwarg handling
logic, so we're pushing it to a future release.

Fixes jruby#9281
@headius headius modified the milestones: JRuby 10.0.4.0, JRuby 10.0.5.0 Mar 3, 2026
@headius
Copy link
Copy Markdown
Member Author

headius commented Mar 3, 2026

This is still broken and needs a deeper investigation. We'll go with #9285 for 10.0.4.0 and fix this "the right way" for a future release.

@kares
Copy link
Copy Markdown
Member

kares commented Mar 13, 2026

full call-info review is now at: #9302

@headius
Copy link
Copy Markdown
Member Author

headius commented Mar 28, 2026

Superseded by #9302.

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

Successfully merging this pull request may close these issues.

2 participants