Skip to content

Commit 8d5c2a9

Browse files
takateako1
authored andcommitted
fix: load_history method return the line count of the history
Fixed the `load_history` method in the console.rb The following changes: * Load the history only if it doesn't exist * Return value to the line count of the history
1 parent d93e108 commit 8d5c2a9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/debug/console.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,11 +224,11 @@ def deactivate
224224
end
225225

226226
def load_history
227-
read_history_file.count{|line|
227+
read_history_file.each{|line|
228228
line.strip!
229229
history << line unless line.empty?
230-
}
230+
} if history.empty?
231+
history.count
231232
end
232233
end # class Console
233234
end
234-

0 commit comments

Comments
 (0)