ruby / ruby/ostruct

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

Aperta
#9 1 commento 0 reazioni 1 assegnatario Vedi su GitHub

@marcandre ci sta già lavorando.

Dal 31/7/2019.

Lingua principale
Ruby
Stelle
175
Fork
35
Merge medio
16h 14m
PR unite (30g)
1

Descrizione

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

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.