class CodeTools::AST::Match
Attributes
pattern[RW]
Public Class Methods
new(line, pattern, flags)
click to toggle source
# File lib/rubinius/code/ast/control_flow.rb, line 443 def initialize(line, pattern, flags) @line = line @pattern = RegexLiteral.new line, pattern, flags end
Public Instance Methods
bytecode(g)
click to toggle source
# File lib/rubinius/code/ast/control_flow.rb, line 448 def bytecode(g) pos(g) g.push_rubinius g.find_const :Globals g.push_literal :$_ g.send :[], 1 @pattern.bytecode(g) g.send :=~, 1 end
to_sexp()
click to toggle source
# File lib/rubinius/code/ast/control_flow.rb, line 461 def to_sexp [:match, @pattern.to_sexp] end