Skip to content

Usage of Ruby's Safe Navigation Operator (&.) is causing issues when using Ruby versions < 2.3.0 #9

@chris-sansone-angi

Description

@chris-sansone-angi

The respond_to_missing function in lib/ostruct.rb is causing issues when using versions of Ruby < 2.3.0

def respond_to_missing?(mid, include_private = false) # :nodoc:
    mname = mid.to_s.chomp("=").to_sym
    @table&.key?(mname) || super
end

Line 196 uses the &. (Safe Navigation Operator) which was introduced in Ruby 2.3.0.

If you want to use the Safe Navigation Operator then please specify the required_ruby_version property in the ostruct.gemspec file

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions