<div>&quot;&nbsp;&nbsp;It looks like<br><br>STDOUT.puts<br>and<br>puts<br><br>Don't behave the same way with win32console . &quot;</div>
<div>&nbsp;</div>
<div>I'm slower on the uptake, but had reached a similar conclusion, demonstrated here -</div>
<div>&nbsp;</div>
<div>=== </div>
<div>&nbsp;</div>
<div>
<p>require 'Win32/Console/ANSI'</p>
<p>@works = $stdout<br>@works &lt;&lt; &quot;\e[31m&quot; &lt;&lt; &quot;RED&quot; &lt;&lt; &quot;\e[32m&quot; &lt;&lt; &quot;GREEN&quot; &lt;&lt; &quot;\e[0m&quot; &lt;&lt; &quot;normal&quot; &lt;&lt; &quot;\n&quot;<br>
@fails = STDOUT<br>@fails &lt;&lt; &quot;\e[31m&quot; &lt;&lt; &quot;RED&quot; &lt;&lt; &quot;\e[32m&quot; &lt;&lt; &quot;GREEN&quot; &lt;&lt; &quot;\e[0m&quot; &lt;&lt; &quot;normal&quot; &lt;&lt; &quot;\n&quot;</p>
<p>&nbsp;</p></div>
<div>===</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>Changing the default output stream from STDOUT to $stdout breaks other things, but doesn't fix this.</div>
<div>&nbsp;</div>
<div>Looking in the win32console library, at the end of ../Win32/Console/ANSI.rb, it is a new $stdout that</div>
<div>gets returned, which&nbsp;is&nbsp;an &nbsp;IO with its own &nbsp;'write' method. So it seems STDOUT &lt;&lt; 'string' doesn't</div>
<div>go through win32console at all.</div>
<div>&nbsp;</div>
<div>DeeJay</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>&nbsp;</div>