Skip to content

Conversation

@YO4
Copy link
Contributor

@YO4 YO4 commented Dec 19, 2025

fixes jruby/jruby#9126

  • JRuby with newer JVM dows not seems to flush stdout at an expected timing. By explicitly flushing the output, the screen state is finalized before issuing win32api calls.
  • Enable ANSI escape sequence console output if available.
  • If escape sequence output unavailable (that is in legacy console), disable SGR output and use alternative character dialog.

YO4 added 3 commits December 20, 2025 00:33
JRuby with newer JVM dows not seems to flush stdout at an expected timing.
By explicitly flushing the output, the screen state is finalized before issuing win32api calls.
MRI addresses this by converting the control code output to the console to win32api or by enabling VT sequence output to the console.
JRuby does not do these things.

Handle this by enabling VT sequence output to the console.
If that fails, when in legacy console, SGR code printed as a garbage.
JRuby with legacy console window on windows can not use ANSI control sequence. So SGR controls are displayed as garbage.

Introduce character-only dialog display can provide reduced services.
The current Command Prompt window and Terminal do not have this issue.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we translate the second word to English?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

irb seems to be having output buffering issues on Windows.

2 participants