From 4f5d14eb8cb7fba1c583d516d597c5e28d7a5540 Mon Sep 17 00:00:00 2001 From: Nobuhiro IMAI Date: Sat, 21 Nov 2020 08:34:38 +0900 Subject: [DOC] Ripper.{lex,tokenize} now always return full tokens. [ci skip] --- ext/ripper/lib/ripper/lexer.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ext/ripper/lib/ripper/lexer.rb b/ext/ripper/lib/ripper/lexer.rb index 8ddf7900ae..287bd4fdb6 100644 --- a/ext/ripper/lib/ripper/lexer.rb +++ b/ext/ripper/lib/ripper/lexer.rb @@ -17,8 +17,7 @@ class Ripper # The +filename+ and +lineno+ arguments are mostly ignored, since the # return value is just the tokenized input. # By default, this method does not handle syntax errors in +src+, - # ignoring tokens after the syntax error. Use the +raise_errors+ keyword - # to raise a SyntaxError for an error in +src+. + # use the +raise_errors+ keyword to raise a SyntaxError for an error in +src+. # # p Ripper.tokenize("def m(a) nil end") # # => ["def", " ", "m", "(", "a", ")", " ", "nil", " ", "end"] @@ -32,8 +31,7 @@ class Ripper # [[lineno, column], type, token, state]. # The +filename+ argument is mostly ignored. # By default, this method does not handle syntax errors in +src+, - # ignoring tokens after the syntax error. Use the +raise_errors+ keyword - # to raise a SyntaxError for an error in +src+. + # use the +raise_errors+ keyword to raise a SyntaxError for an error in +src+. # # require 'ripper' # require 'pp' -- cgit v1.2.3