Skip to content

Commit

Permalink
Merge pull request #233 from ruby/schneems/nov-15
Browse files Browse the repository at this point in the history
Update docs and comments
  • Loading branch information
schneems authored Nov 15, 2024
2 parents bfb0f22 + 8c36b0c commit 1430e94
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/syntax_suggest/capture_code_context.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module SyntaxSuggest
#
# 1. Sanitize/format input source
# 2. Search for invalid blocks
# 3. Format invalid blocks into something meaninful
# 3. Format invalid blocks into something meaningful
#
# This class handles the third part.
#
Expand Down
2 changes: 1 addition & 1 deletion lib/syntax_suggest/clean_document.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module SyntaxSuggest
#
# 1. Sanitize/format input source
# 2. Search for invalid blocks
# 3. Format invalid blocks into something meaninful
# 3. Format invalid blocks into something meaningful
#
# This class handles the first part.
#
Expand Down
2 changes: 1 addition & 1 deletion lib/syntax_suggest/code_frontier.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module SyntaxSuggest
#
# 1. Sanitize/format input source
# 2. Search for invalid blocks
# 3. Format invalid blocks into something meaninful
# 3. Format invalid blocks into something meaningful
#
# The Code frontier is a critical part of the second step
#
Expand Down
6 changes: 6 additions & 0 deletions lib/syntax_suggest/mini_stringio.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# frozen_string_literal: true

module SyntaxSuggest
# Mini String IO [Private]
#
# 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 1430e94

Please sign in to comment.