ActiveSupport 7.0 adds Enumerable#maximum, but bindata gem considers all Hash instance methods as reserved keywords. Since maximum is used as property in a bit field, the gem no longer wants to load:
/usr/local/bundle/gems/ruby_smb-2.0.12/lib/ruby_smb/smb2/bit_field/directory_access_mask.rb:33:in `<class:DirectoryAccessMask>': field 'maximum' is a reserved name in RubySMB::SMB2::BitField::DirectoryAccessMask (NameError)
from /usr/local/bundle/gems/ruby_smb-2.0.12/lib/ruby_smb/smb2/bit_field/directory_access_mask.rb:6:in `<module:BitField>'
from /usr/local/bundle/gems/ruby_smb-2.0.12/lib/ruby_smb/smb2/bit_field/directory_access_mask.rb:3:in `<module:SMB2>'
from /usr/local/bundle/gems/ruby_smb-2.0.12/lib/ruby_smb/smb2/bit_field/directory_access_mask.rb:2:in `<module:RubySMB>'
from /usr/local/bundle/gems/ruby_smb-2.0.12/lib/ruby_smb/smb2/bit_field/directory_access_mask.rb:1:in `<top (required)>'
from /usr/local/bundle/gems/zeitwerk-2.5.1/lib/zeitwerk/kernel.rb:35:in `require'
from /usr/local/bundle/gems/zeitwerk-2.5.1/lib/zeitwerk/kernel.rb:35:in `require'
from /usr/local/bundle/gems/ruby_smb-2.0.12/lib/ruby_smb/smb2/bit_field.rb:10:in `<module:BitField>'
from /usr/local/bundle/gems/ruby_smb-2.0.12/lib/ruby_smb/smb2/bit_field.rb:4:in `<module:SMB2>'
from /usr/local/bundle/gems/ruby_smb-2.0.12/lib/ruby_smb/smb2/bit_field.rb:2:in `<module:RubySMB>'
from /usr/local/bundle/gems/ruby_smb-2.0.12/lib/ruby_smb/smb2/bit_field.rb:1:in `<top (required)>'
from /usr/local/bundle/gems/zeitwerk-2.5.1/lib/zeitwerk/kernel.rb:35:in `require'
from /usr/local/bundle/gems/zeitwerk-2.5.1/lib/zeitwerk/kernel.rb:35:in `require'
from /usr/local/bundle/gems/ruby_smb-2.0.12/lib/ruby_smb/smb2.rb:14:in `<module:SMB2>'
from /usr/local/bundle/gems/ruby_smb-2.0.12/lib/ruby_smb/smb2.rb:5:in `<module:RubySMB>'
from /usr/local/bundle/gems/ruby_smb-2.0.12/lib/ruby_smb/smb2.rb:1:in `<top (required)>'
from /usr/local/bundle/gems/zeitwerk-2.5.1/lib/zeitwerk/kernel.rb:35:in `require'
from /usr/local/bundle/gems/zeitwerk-2.5.1/lib/zeitwerk/kernel.rb:35:in `require'
from /usr/local/bundle/gems/ruby_smb-2.0.12/lib/ruby_smb.rb:24:in `<module:RubySMB>'
from /usr/local/bundle/gems/ruby_smb-2.0.12/lib/ruby_smb.rb:13:in `<top (required)>'
from /usr/local/bundle/gems/zeitwerk-2.5.1/lib/zeitwerk/kernel.rb:35:in `require'
from /usr/local/bundle/gems/zeitwerk-2.5.1/lib/zeitwerk/kernel.rb:35:in `require'
from /srv/lib/<redacted>/smb.rb:3:in `<top (required)>'
from /usr/local/bundle/gems/zeitwerk-2.5.1/lib/zeitwerk/kernel.rb:27:in `require'
from /usr/local/bundle/gems/zeitwerk-2.5.1/lib/zeitwerk/kernel.rb:27:in `require'
from /usr/local/bundle/gems/zeitwerk-2.5.1/lib/zeitwerk/loader/helpers.rb:95:in `const_get'
from /usr/local/bundle/gems/zeitwerk-2.5.1/lib/zeitwerk/loader/helpers.rb:95:in `cget'
from /usr/local/bundle/gems/zeitwerk-2.5.1/lib/zeitwerk/loader.rb:232:in `block (2 levels) in eager_load'
from /usr/local/bundle/gems/zeitwerk-2.5.1/lib/zeitwerk/loader/helpers.rb:26:in `block in ls'
from /usr/local/bundle/gems/zeitwerk-2.5.1/lib/zeitwerk/loader/helpers.rb:18:in `each_child'
from /usr/local/bundle/gems/zeitwerk-2.5.1/lib/zeitwerk/loader/helpers.rb:18:in `ls'
from /usr/local/bundle/gems/zeitwerk-2.5.1/lib/zeitwerk/loader.rb:227:in `block in eager_load'
from /usr/local/bundle/gems/zeitwerk-2.5.1/lib/zeitwerk/loader.rb:212:in `synchronize'
from /usr/local/bundle/gems/zeitwerk-2.5.1/lib/zeitwerk/loader.rb:212:in `eager_load'
from /srv/lib/<redacted>.rb:64:in `<top (required)>'
from /srv/config/application.rb:7:in `require'
from /srv/config/application.rb:7:in `<top (required)>'
from bin/console:5:in `require_relative'
from bin/console:5:in `<main>'
/usr/local/bundle/gems/bindata-2.4.10/lib/bindata/dsl.rb:435:in `ensure_valid_name': field 'maximum' is a reserved name (NameError)
from /usr/local/bundle/gems/bindata-2.4.10/lib/bindata/dsl.rb:417:in `validate_field'
from /usr/local/bundle/gems/bindata-2.4.10/lib/bindata/dsl.rb:183:in `parse_and_append_field'
from /usr/local/bundle/gems/bindata-2.4.10/lib/bindata/dsl.rb:120:in `method_missing'
from /usr/local/bundle/gems/bindata-2.4.10/lib/bindata/dsl.rb:46:in `method_missing'
from /usr/local/bundle/gems/ruby_smb-2.0.12/lib/ruby_smb/smb2/bit_field/directory_access_mask.rb:33:in `<class:DirectoryAccessMask>'
from /usr/local/bundle/gems/ruby_smb-2.0.12/lib/ruby_smb/smb2/bit_field/directory_access_mask.rb:6:in `<module:BitField>'
from /usr/local/bundle/gems/ruby_smb-2.0.12/lib/ruby_smb/smb2/bit_field/directory_access_mask.rb:3:in `<module:SMB2>'
from /usr/local/bundle/gems/ruby_smb-2.0.12/lib/ruby_smb/smb2/bit_field/directory_access_mask.rb:2:in `<module:RubySMB>'
from /usr/local/bundle/gems/ruby_smb-2.0.12/lib/ruby_smb/smb2/bit_field/directory_access_mask.rb:1:in `<top (required)>'
from /usr/local/bundle/gems/zeitwerk-2.5.1/lib/zeitwerk/kernel.rb:35:in `require'
from /usr/local/bundle/gems/zeitwerk-2.5.1/lib/zeitwerk/kernel.rb:35:in `require'
from /usr/local/bundle/gems/ruby_smb-2.0.12/lib/ruby_smb/smb2/bit_field.rb:10:in `<module:BitField>'
from /usr/local/bundle/gems/ruby_smb-2.0.12/lib/ruby_smb/smb2/bit_field.rb:4:in `<module:SMB2>'
from /usr/local/bundle/gems/ruby_smb-2.0.12/lib/ruby_smb/smb2/bit_field.rb:2:in `<module:RubySMB>'
from /usr/local/bundle/gems/ruby_smb-2.0.12/lib/ruby_smb/smb2/bit_field.rb:1:in `<top (required)>'
from /usr/local/bundle/gems/zeitwerk-2.5.1/lib/zeitwerk/kernel.rb:35:in `require'
from /usr/local/bundle/gems/zeitwerk-2.5.1/lib/zeitwerk/kernel.rb:35:in `require'
from /usr/local/bundle/gems/ruby_smb-2.0.12/lib/ruby_smb/smb2.rb:14:in `<module:SMB2>'
from /usr/local/bundle/gems/ruby_smb-2.0.12/lib/ruby_smb/smb2.rb:5:in `<module:RubySMB>'
from /usr/local/bundle/gems/ruby_smb-2.0.12/lib/ruby_smb/smb2.rb:1:in `<top (required)>'
from /usr/local/bundle/gems/zeitwerk-2.5.1/lib/zeitwerk/kernel.rb:35:in `require'
from /usr/local/bundle/gems/zeitwerk-2.5.1/lib/zeitwerk/kernel.rb:35:in `require'
from /usr/local/bundle/gems/ruby_smb-2.0.12/lib/ruby_smb.rb:24:in `<module:RubySMB>'
from /usr/local/bundle/gems/ruby_smb-2.0.12/lib/ruby_smb.rb:13:in `<top (required)>'
from /usr/local/bundle/gems/zeitwerk-2.5.1/lib/zeitwerk/kernel.rb:35:in `require'
from /usr/local/bundle/gems/zeitwerk-2.5.1/lib/zeitwerk/kernel.rb:35:in `require'
from /srv/lib/<redacted>/smb.rb:3:in `<top (required)>'
from /usr/local/bundle/gems/zeitwerk-2.5.1/lib/zeitwerk/kernel.rb:27:in `require'
from /usr/local/bundle/gems/zeitwerk-2.5.1/lib/zeitwerk/kernel.rb:27:in `require'
from /usr/local/bundle/gems/zeitwerk-2.5.1/lib/zeitwerk/loader/helpers.rb:95:in `const_get'
from /usr/local/bundle/gems/zeitwerk-2.5.1/lib/zeitwerk/loader/helpers.rb:95:in `cget'
from /usr/local/bundle/gems/zeitwerk-2.5.1/lib/zeitwerk/loader.rb:232:in `block (2 levels) in eager_load'
from /usr/local/bundle/gems/zeitwerk-2.5.1/lib/zeitwerk/loader/helpers.rb:26:in `block in ls'
from /usr/local/bundle/gems/zeitwerk-2.5.1/lib/zeitwerk/loader/helpers.rb:18:in `each_child'
from /usr/local/bundle/gems/zeitwerk-2.5.1/lib/zeitwerk/loader/helpers.rb:18:in `ls'
from /usr/local/bundle/gems/zeitwerk-2.5.1/lib/zeitwerk/loader.rb:227:in `block in eager_load'
from /usr/local/bundle/gems/zeitwerk-2.5.1/lib/zeitwerk/loader.rb:212:in `synchronize'
from /usr/local/bundle/gems/zeitwerk-2.5.1/lib/zeitwerk/loader.rb:212:in `eager_load'
from /srv/lib/<redacted>.rb:64:in `<top (required)>'
from /srv/config/application.rb:7:in `require'
from /srv/config/application.rb:7:in `<top (required)>'
from bin/console:5:in `require_relative'
from bin/console:5:in `<main>'
Thanks for reporting this @floriandejonckheere. One simple solution would be to rename this field, but we need to make sure this change doesn't break anything else in the library.
ActiveSupport 7.0 adds
Enumerable#maximum
, butbindata
gem considers all Hash instance methods as reserved keywords. Sincemaximum
is used as property in a bit field, the gem no longer wants to load: