File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -134,9 +134,7 @@ def init_ciphers(server_file, client_file)
134
134
# from the server, this method will decide which message has to be sent next
135
135
#
136
136
def process_data ( data )
137
- unless data . nil?
138
- @inbuffer += data
139
- end
137
+ @inbuffer += data if data
140
138
case @state
141
139
when :id_state
142
140
if line?
@@ -262,15 +260,15 @@ def read_line
262
260
idx = @inbuffer . index ( "\n " )
263
261
data = @inbuffer . slice! ( 0 , idx )
264
262
@inbuffer . lstrip!
265
- return data
263
+ data
266
264
end
267
265
268
266
#
269
267
# Check if we already received a newline, meaning we got an
270
268
# entire message for the next protocol step
271
269
#
272
270
def line?
273
- !@inbuffer . match ( "\n " ) . nil?
271
+ !! ( @inbuffer . match ( "\n " ) )
274
272
end
275
273
276
274
#
You can’t perform that action at this time.
0 commit comments