mirror of
https://github.com/vidarh/ruby-x11
synced 2024-12-27 09:59:21 +01:00
shortened
This commit is contained in:
parent
88152ffee6
commit
a6999815de
1 changed files with 1 additions and 2 deletions
|
@ -53,8 +53,7 @@ module X11
|
||||||
|
|
||||||
# returns one entry from Xauthority file
|
# returns one entry from Xauthority file
|
||||||
def read
|
def read
|
||||||
auth_info = []
|
auth_info = [] << ADDRESS_TYPES[ @file.read(2).unpack('n').first ]
|
||||||
auth_info << ADDRESS_TYPES[ @file.read(2).unpack('n').first ]
|
|
||||||
4.times { length = @file.read(2).unpack('n').first; auth_info << @file.read(length).first }
|
4.times { length = @file.read(2).unpack('n').first; auth_info << @file.read(length).first }
|
||||||
AuthInfo[*auth_info]
|
AuthInfo[*auth_info]
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue