зеркало из https://github.com/github/ruby.git
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
This commit is contained in:
Родитель
b81ac5150a
Коммит
32a4b080f1
|
@ -54,6 +54,9 @@ class Ripper
|
|||
def ==(i) super or to_int == i end
|
||||
def &(i) self.class.new(to_int & i) end
|
||||
def |(i) self.class.new(to_int & i) end
|
||||
def allbits?(i) to_int.allbits?(i) end
|
||||
def anybits?(i) to_int.anybits?(i) end
|
||||
def nobits?(i) to_int.nobits?(i) end
|
||||
end
|
||||
|
||||
Elem = Struct.new(:pos, :event, :tok, :state) do
|
||||
|
|
Загрузка…
Ссылка в новой задаче