summaryrefslogtreecommitdiff
path: root/lib/prism.rb
diff options
context:
space:
mode:
authorKevin Newton <kddnewton@gmail.com>2023-12-04 12:15:13 -0500
committergit <svn-admin@ruby-lang.org>2023-12-04 17:15:19 +0000
commitd35aa58b2fac5ce0172c3a940a9b5f33af21bc56 (patch)
tree7f993f84589d7edebf10f93c8c1d1a74d9109604 /lib/prism.rb
parentea9f89eeb68dd7cac0083c1cfc5300672b380d00 (diff)
[ruby/prism] Fix up docs for lex_compat
https://github.com/ruby/prism/commit/9131e84060
Diffstat (limited to 'lib/prism.rb')
-rw-r--r--lib/prism.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/prism.rb b/lib/prism.rb
index b9e615df6c..6501ad7819 100644
--- a/lib/prism.rb
+++ b/lib/prism.rb
@@ -36,11 +36,11 @@ module Prism
private_constant :LexRipper
# :call-seq:
- # Prism::lex_compat(source, **options) -> Array
+ # Prism::lex_compat(source, **options) -> ParseResult
#
- # Returns an array of tokens that closely resembles that of the Ripper lexer.
- # The only difference is that since we don't keep track of lexer state in the
- # same way, it's going to always return the NONE state.
+ # Returns a parse result whose value is an array of tokens that closely
+ # resembles the return value of Ripper::lex. The main difference is that the
+ # `:on_sp` token is not emitted.
#
# For supported options, see Prism::parse.
def self.lex_compat(source, **options)