Sha256: 9c915b7eb76a74ce4aa51e30b8c4f88bf78beb2dbdd35d66a3f9eed1d44f12d1

Contents?: true

Size: 512 Bytes

Versions: 13

Compression:

Stored size: 512 Bytes

Contents

# Encoding patch, stolen from https://github.com/ln/xmpp4r/issues/3#issuecomment-1739952
require 'socket'
class TCPSocket
  def external_encoding
    Encoding::BINARY
  end
end

require 'rexml/source'
class REXML::IOSource
  alias_method :encoding_assign, :encoding=
  def encoding=(value)
    encoding_assign(value) if value
  end
end

begin
  # OpenSSL is optional and can be missing
  require 'openssl'
  class OpenSSL::SSL::SSLSocket
    def external_encoding
      Encoding::BINARY
    end
  end
rescue
end

Version data entries

13 entries across 13 versions & 3 rubygems

Version Path
sclemmer-robut-0.6.3 lib/rexml_patches.rb
sclemmer-robut-0.6.2 lib/rexml_patches.rb
sclemmer-robut-0.6.1 lib/rexml_patches.rb
sclemmer-robut-0.6.0 lib/rexml_patches.rb
sclemmer-robut-0.5.4 lib/rexml_patches.rb
sclemmer-robut-0.5.3 lib/rexml_patches.rb
sclemmer-robut-0.5.2 lib/rexml_patches.rb
robut-0.5.2 lib/rexml_patches.rb
robut-0.5.1 lib/rexml_patches.rb
zoe-0.1.0 lib/zoe/rexml_patches.rb
robut-0.5.0 lib/rexml_patches.rb
robut-0.4.0 lib/rexml_patches.rb
robut-0.3.0 lib/rexml_patches.rb