Skip to content

Require ostruct explicitly#399

Merged
michaelklishin merged 1 commit into
ruby-amqp:mainfrom
sharshenov:ostruct
May 8, 2024
Merged

Require ostruct explicitly#399
michaelklishin merged 1 commit into
ruby-amqp:mainfrom
sharshenov:ostruct

Conversation

@sharshenov
Copy link
Copy Markdown
Contributor

OpenStruct is optional since JSON v 2.7.2

References:

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|
                      ^^^^^^^^^^

`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|
                      ^^^^^^^^^^
```
@michaelklishin michaelklishin merged commit 365f279 into ruby-amqp:main May 8, 2024
@michaelklishin michaelklishin added this to the 1.3.0 milestone Nov 11, 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