Sha256: 6480431d41e094c86d0cda715176ba93adba6d1410514e59f8085e003cabbdd3

Contents?: true

Size: 254 Bytes

Versions: 11

Compression:

Stored size: 254 Bytes

Contents

class << ENV
  def except(*keys)
    if keys.size > 4 && size > 4 # index if O(m*n) is big
      h = {}
      keys.each { |key| h[key] = true }
      keys = h
    end
    reject { |key, _value| keys.include? key}
  end
end unless ENV.respond_to? :except

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
backports-3.25.0 lib/backports/3.0.0/env/except.rb
backports-3.24.1 lib/backports/3.0.0/env/except.rb
backports-3.24.0 lib/backports/3.0.0/env/except.rb
backports-3.23.0 lib/backports/3.0.0/env/except.rb
backports-3.22.1 lib/backports/3.0.0/env/except.rb
backports-3.22.0 lib/backports/3.0.0/env/except.rb
backports-3.21.0 lib/backports/3.0.0/env/except.rb
backports-3.20.2 lib/backports/3.0.0/env/except.rb
backports-3.20.1 lib/backports/3.0.0/env/except.rb
backports-3.20.0 lib/backports/3.0.0/env/except.rb
backports-3.19.0 lib/backports/3.0.0/env/except.rb