During CI bug investigation we noticed this code:
|
def activate(stream, streamname) |
|
writer = StdoutRouter::Writer.new(stream, streamname) |
|
|
|
raise if stream.respond_to?(WRITE_WITHOUT_CLI_UI) |
|
|
|
stream.singleton_class.send(:alias_method, WRITE_WITHOUT_CLI_UI, :write) |
|
stream.define_singleton_method(:write) do |*args| |
|
writer.write(*args) |
|
end |
overriding
IO#write for
STDOUT and
STDERR. This is quietly disabled by any call on
IO#reopen, for example: a test calling
#capture from
https://github.com/rails/rails/blob/0e99d0893b0e98c626a3c7d8972eea22d29c9d25/activesupport/lib/active_support/testing/stream.rb#L23-L38
If the goal of the cli-ui code to be permanent, it needs adjustments. This is true for CRuby and TruffleRuby engines.
More details: truffleruby/truffleruby#3088
During CI bug investigation we noticed this code:
cli-ui/lib/cli/ui/stdout_router.rb
Lines 402 to 410 in f6294ff
IO#writeforSTDOUTandSTDERR. This is quietly disabled by any call onIO#reopen, for example: a test calling#capturefrom https://github.com/rails/rails/blob/0e99d0893b0e98c626a3c7d8972eea22d29c9d25/activesupport/lib/active_support/testing/stream.rb#L23-L38If the goal of the cli-ui code to be permanent, it needs adjustments. This is true for CRuby and TruffleRuby engines.
More details: truffleruby/truffleruby#3088