Skip to content

Commit

Permalink
fix: load_history method return the line count of the history
Browse files Browse the repository at this point in 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
  • Loading branch information
takatea authored and ko1 committed Sep 25, 2023
1 parent d93e108 commit 8d5c2a9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/debug/console.rb
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,11 @@ def deactivate
end

def load_history
read_history_file.count{|line|
read_history_file.each{|line|
line.strip!
history << line unless line.empty?
}
} if history.empty?
history.count
end
end # class Console
end

0 comments on commit 8d5c2a9

Please sign in to comment.