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

Make OpenStruct support as optional #565

Merged
merged 1 commit into from
Jan 31, 2024
Merged

Make OpenStruct support as optional #565

merged 1 commit into from
Jan 31, 2024

Conversation

hsbt
Copy link
Member

@hsbt hsbt commented Jan 31, 2024

see https://github.com/ruby/ostruct/blob/master/lib/ostruct.rb#L136

OpenStruct is not recommend to use with performance reason today. We should make OpenStruct support as optional.

@hsbt hsbt merged commit 92c91e2 into master Jan 31, 2024
130 checks passed
@hsbt hsbt deleted the optional-ostruct branch January 31, 2024 04:55
@Earlopain

This comment was marked as off-topic.

sharshenov added a commit to sharshenov/hutch that referenced this pull request May 7, 2024
`OpenStruct` is optional since `JSON` v 2.7.2

References:
- ruby/json#565
- https://github.com/ruby/ostruct/blob/master/lib/ostruct.rb#L136

This commit fixes error:

```
Hutch.connect

gems/hutch-1.2.0/lib/hutch/broker.rb:272:in `api_config': uninitialized constant Hutch::Broker::OpenStruct (NameError)

      @api_config ||= OpenStruct.new.tap do |config|
                      ^^^^^^^^^^
```
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