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

Remove OpenStruct usage from Pry::CommandState #2307

Merged
merged 1 commit into from Apr 16, 2024

Conversation

andrehjr
Copy link
Member

This PR works towards removing OpenStruct usage. As ostruct will no longer be part of the default gems after Ruby 3.5.

I am still on the fence about using command_options state to define the attributes for the Struct for each Command. Or, changing CommandState back to a Hash instead. I've checked a few plugins to see if anyone outside pry is using state directly.. But I couldn't find any.

To reduce the amount of changes and keep compatibility with other Pry Commands on this PR, I've tried to keep changes to a minimum and went with the Struct approach, and may refactor again later on.

ruby-head is still faling, as there are more OpenStruct references on the code.

@andrehjr andrehjr marked this pull request as ready for review April 14, 2024 23:07
@andrehjr andrehjr force-pushed the remove-ostruct-command-state branch from c98f243 to d8e41fa Compare April 16, 2024 16:08
@andrehjr andrehjr merged commit 6f4d2c1 into pry:master Apr 16, 2024
20 checks passed
@andrehjr andrehjr deleted the remove-ostruct-command-state branch April 16, 2024 22:57
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.

None yet

1 participant