Skip to content

Commit

Permalink
Explain why class exists
Browse files Browse the repository at this point in the history
  • Loading branch information
schneems committed Nov 15, 2024
1 parent 9c78283 commit 8c36b0c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/syntax_suggest/mini_stringio.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 8c36b0c

Please sign in to comment.