Skip to content

Commit 5345e99

Browse files
author
Dave O
committed
Install latest ostruct to fix JSON parsing into an OpenStruct
The OpenStruct implementation differs between Ruby 2.7 and 3.1. The latter comes with OpenStruct 0.5.2. That version has a bug that was fixed [here](ruby/ostruct#37). The TL;DR of the impact of that bug in this repo is that brakeman includes JSON with an attribute named `class`. This shadows the normal `class` method and causes `self.class.ancestors` to blow up. The fix uses the aliased `class!` method to do the Right Thing™.
1 parent 9c4ade4 commit 5345e99

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

action/install_gems.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ def self.install
66
source "https://rubygems.org"
77

88
gem 'brakeman'
9+
gem 'ostruct'
910
end
1011
end
1112
end

0 commit comments

Comments
 (0)