Add allbits?, anybits and nobits? to Ripper::Lexer::State
nobu (Nobuyoshi Nakada) added Ripper::Lexer::State at @60665
and I think it's necessary for RDoc, I commented it at ruby-core:84111.
aycabta (aycabta .) wrote:
In Ruby 2.5, Ripper::Lexer::State is introduced:
It is for lex_state of parse.y, and has #& and #| for bit operations with lex_state_bits:
If Integer#allbit? is implemented at 2.5, it's good for Ripper::Lexer::State and I'll use it for RDoc on 2.5.
I add allbits?, anybits and nobits? to Ripper::Lexer::State by the attached patch.
Ripper::Lexer bit predicates
- ext/ripper/lib/ripper/lexer.rb (Ripper::Lexer): added allbits?, anybits? and nobits? methods, as well as Integer. a patch by aycabta. [Feature #14170]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Updated by aycabta (aycabta .) over 1 year ago
If this request is added, I'll add supporting it at upstream:
The corresponding file:
The RDoc::RipperStateLex is easy to understand use-case for this issue.
Updated by nobu (Nobuyoshi Nakada) over 1 year ago
- Status changed from Open to Closed