[ruby/syntax_suggest] Explain why class exists

https://github.com/ruby/syntax_suggest/commit/8c36b0cb35
This commit is contained in:
Schneems 2024-11-15 10:02:58 -06:00 committed by git
parent 03a77c03eb
commit 3a547e2539

View File

@ -5,6 +5,10 @@ module SyntaxSuggest
#
# Acts like a StringIO with reduced API, but without having to require that
# class.
#
# The original codebase emitted directly to $stderr, but now SyntaxError#detailed_message
# needs a string output. To accomplish that we kept the original print infrastructure in place and
# added this class to accumulate the print output into a string.
class MiniStringIO
EMPTY_ARG = Object.new