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 #454

Merged
merged 1 commit into from
Oct 15, 2024
Merged

Conversation

eugeneius
Copy link
Contributor

Loading the gem on Ruby 3.3.5 or 3.4.0-preview1 prints this warning:

lib/jira-ruby.rb:53: warning: ostruct was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.5.0.
You can add ostruct to your Gemfile or gemspec to silence this warning.

OpenStruct is used to store two values (field_map and field_map_reverse) but only field_map was actually used, so we can store it directly in an instance variable and remove the dependency on OpenStruct.

Loading the gem on Ruby 3.3.5 or 3.4.0-preview1 prints this warning:

    lib/jira-ruby.rb:53: warning: ostruct was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.5.0.
    You can add ostruct to your Gemfile or gemspec to silence this warning.

OpenStruct is used to store two values, field_map and field_map_reverse,
but only field_map was used, so we can store it directly in an instance
variable and remove the dependency on OpenStruct.
Copy link
Member

@bobbrodie bobbrodie left a comment

Choose a reason for hiding this comment

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

@eugeneius this is great, thanks! I'll merge and get it into 3.0.0-beta2. Before I push that, I'll work on cleaning up the RSpec/StringAsInstanceDoubleConstant checks.

@bobbrodie bobbrodie added this to the v3.0.0 milestone Oct 15, 2024
@bobbrodie bobbrodie merged commit 960e265 into sumoheavy:master Oct 15, 2024
5 of 6 checks passed
@bobbrodie bobbrodie mentioned this pull request Oct 15, 2024
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