Skip to content

Code was trying to make an int out of the kwargs hash.#7593

Merged
enebo merged 1 commit intojruby:masterfrom
enebo:fix_7583
Jan 24, 2023
Merged

Code was trying to make an int out of the kwargs hash.#7593
enebo merged 1 commit intojruby:masterfrom
enebo:fix_7583

Conversation

@enebo
Copy link
Member

@enebo enebo commented Jan 24, 2023

Fixes #7583. We have some fairly convoluted options processing for Dir.glob and Dir.[] which is shared. We were assuming #glob flags processing was active when we were processing #[] and trying to convert the options kwargs into an int value (boom).

Renamed some stuff for clarity and fixed underlying problem. A rainy day job here would be to rewrite this method or possibly just make it two methods. I do not recommend this until our next kwargs design change. We may have a better interface for specifying kwargs which would make a significant part of this method not exist.

Fixes jruby#7583.  We have some fairly convoluted options processing for
Dir.glob and Dir.[] which is shared.  We were assuming #glob flags
processing was active when we were processing #[] and trying to convert
the options kwargs into an int value (boom).

Renamed some stuff for clarity and fixed underlying problem.  A rainy
day job here would be to rewrite this method or possibly just make it
two methods.  I do not recommend this until our next kwargs design
change.  We may have a better interface for specifying kwargs which
would make a significant part of this method not exist.
@enebo enebo added this to the JRuby 9.4.1.0 milestone Jan 24, 2023
@enebo enebo merged commit 2cf375f into jruby:master Jan 24, 2023
@enebo enebo deleted the fix_7583 branch March 4, 2025 18:33
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.

Dir[] with multiple patterns fails if kwargs given.

1 participant