Module: JRubyBug2558SocketPeerAddrBugFix

Included in:
TCPSocket, UDPSocket
Defined in:
lib/logstash/patches/bugfix_jruby_2558.rb

Instance Method Summary collapse

Instance Method Details

#peeraddr(*args) ⇒ Object



6
7
8
9
10
11
12
13
14
15
# File 'lib/logstash/patches/bugfix_jruby_2558.rb', line 6

def peeraddr(*args)
  orig_peeraddr(*args).map do |v|
    case v
    when String
      v.force_encoding(Encoding::UTF_8)
    else
      v
    end
  end
end