Skip to content

Commit

Permalink
Require ostruct explicitly
Browse files Browse the repository at this point in the history
`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|
                      ^^^^^^^^^^
```
  • Loading branch information
sharshenov committed May 7, 2024
1 parent cb7b1ba commit 7327344
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/hutch/broker.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
require 'active_support/core_ext/object/blank'

require 'carrot-top'
require 'ostruct'
require 'hutch/logging'
require 'hutch/exceptions'
require 'hutch/publisher'
Expand Down

0 comments on commit 7327344

Please sign in to comment.