Sha256: a3999c6604b363d76bdb9ce37fe69b223f2ff15ca879593ced158f9ffa118d75

Contents?: true

Size: 124 Bytes

Versions: 15

Compression:

Stored size: 124 Bytes

Contents

# Polyfills for older Rubies

class Array

  unless method_defined?(:to_h)
    def to_h
      Hash[self]
    end
  end

end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
swa-0.8.3 lib/swa/polyfill.rb
swa-0.8.2 lib/swa/polyfill.rb
swa-0.8.1 lib/swa/polyfill.rb
swa-0.8.0 lib/swa/polyfill.rb
swa-0.7.7 lib/swa/polyfill.rb
swa-0.7.6 lib/swa/polyfill.rb
swa-0.7.5 lib/swa/polyfill.rb
swa-0.7.4 lib/swa/polyfill.rb
swa-0.7.3 lib/swa/polyfill.rb
swa-0.7.2 lib/swa/polyfill.rb
swa-0.7.1 lib/swa/polyfill.rb
swa-0.7.0 lib/swa/polyfill.rb
swa-0.6.1 lib/swa/polyfill.rb
swa-0.6.0 lib/swa/polyfill.rb
swa-0.5.2 lib/swa/polyfill.rb