Sha256: 7dea4c45ccd7cd6b43b1fc47991bc3c00532c5ce13e6fb00567776682f11012b

Contents?: true

Size: 355 Bytes

Versions: 14

Compression:

Stored size: 355 Bytes

Contents

require 'uri'

module Ruby3BackwardCompatibility
  module URICompatibility
    class SchemeProxy
      def [](scheme)
        URI.scheme_list[scheme]
      end

      def []=(scheme, value)
        URI.register_scheme(scheme, value)
      end
    end
  end
end

module URI
  @@schemes ||= Ruby3BackwardCompatibility::URICompatibility::SchemeProxy.new
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
ruby3-backward-compatibility-1.4.0 lib/ruby3_backward_compatibility/compatibility/uri.rb
ruby3-backward-compatibility-1.3.0 lib/ruby3_backward_compatibility/compatibility/uri.rb
ruby3-backward-compatibility-1.2.0 lib/ruby3_backward_compatibility/compatibility/uri.rb
ruby3-backward-compatibility-1.1.1 lib/ruby3_backward_compatibility/compatibility/uri.rb
ruby3-backward-compatibility-1.1.0 lib/ruby3_backward_compatibility/compatibility/uri.rb
ruby3-backward-compatibility-1.0.0 lib/ruby3_backward_compatibility/compatibility/uri.rb
ruby3-backward-compatibility-0.3.0 lib/ruby3_backward_compatibility/compatibility/uri.rb
ruby3-backward-compatibility-0.2.3 lib/ruby3_backward_compatibility/compatibility/uri.rb
ruby3-backward-compatibility-0.2.2 lib/ruby3_backward_compatibility/compatibility/uri.rb
ruby3-backward-compatibility-0.2.1 lib/ruby3_backward_compatibility/compatibility/uri.rb
ruby3-backward-compatibility-0.2.0 lib/ruby3_backward_compatibility/compatibility/uri.rb
ruby3-backward-compatibility-0.1.3 lib/ruby3_backward_compatibility/compatibility/uri.rb
ruby3-backward-compatibility-0.1.2 lib/ruby3_backward_compatibility/compatibility/uri.rb
ruby3-backward-compatibility-0.1.1 lib/ruby3_backward_compatibility/compatibility/uri.rb