This code was for ruby 2.4 compatibility, but rdoc dropped support for
ruby 2.4 about three years ago, in f480b970c. This code was almost half
of the lines of code in rdoc/parser/ripper_state_lex.
Remove unused Ripper constants and const_defined?
This was mostly copied from the diff in @st0012's PR comment. The
remaining constants have been updated to get their value directly from
Ripper.
Since this is only used from outside RipperStateLex, there's no longer
any benefit to using the indirect reference rather than just going
straight to Ripper.
[ruby/rdoc] Drop reimplementation of Ripper lex state
(https://github.com/ruby/rdoc/pull/1118)
This code was for ruby 2.4 compatibility, but rdoc dropped support for
ruby 2.4 about three years ago, in f480b970c. This code was almost half
of the lines of code in rdoc/parser/ripper_state_lex.
This was mostly copied from the diff in @st0012's PR comment. The
remaining constants have been updated to get their value directly from
Ripper.
Co-authored-by: Stan Lo [email protected]
Since this is only used from outside RipperStateLex, there's no longer
any benefit to using the indirect reference rather than just going
straight to Ripper.
https://github.com/ruby/rdoc/commit/dd8c216263
Co-authored-by: Stan Lo [email protected]