Skip to content

Commit 2c338ef

Browse files
committed
Improved loop break [skip ci]
1 parent ee53033 commit 2c338ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/lightgbm/booster.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ def load_pandas_categorical(file_name: nil, model_str: nil)
254254
offset = [offset, max_offset].max
255255
f.seek(offset, IO::SEEK_END)
256256
lines = f.readlines
257-
if lines.length >= 2
257+
if lines.length >= 2 || offset == max_offset
258258
break
259259
end
260260
offset *= 2

0 commit comments

Comments
 (0)