Skip to content

Commit

Permalink
Merge pull request #276 from blipper/patch-1
Browse files Browse the repository at this point in the history
Update say to always flush the output after a puts
  • Loading branch information
abinoam authored Aug 28, 2024
2 parents 10e6f91 + 1aff93d commit 8c99b67
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Below is a complete listing of changes for each revision of HighLine.

### 3.1.1 / 2024-08-18
* PR #276 - Update #say to always flush the output after a #puts (@blipper)
* PR #274 / I #273 (@costa)
* Add Highline#add_to_color_scheme
* Dockerize the test environment. Just run `bin/test` and voilá!
Expand Down
2 changes: 1 addition & 1 deletion lib/highline.rb
Original file line number Diff line number Diff line change
Expand Up @@ -385,10 +385,10 @@ def say(statement)
# if statement ends with whitespace before a color escape code.
if /[ \t](\e\[\d+(;\d+)*m)?\Z/ =~ statement
output.print(statement)
output.flush
else
output.puts(statement)
end
output.flush # See: https://github.com/JEG2/highline/pull/276
end

# Renders and indents a statement.
Expand Down

0 comments on commit 8c99b67

Please sign in to comment.