shortened

This commit is contained in:
Matthias Beyer 2012-03-11 20:27:45 +01:00
parent 88152ffee6
commit a6999815de

View file

@ -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