Class: Rubinius::ToolSet.current::TS::AST::DynamicOnceRegex

Inherits:
DynamicRegex show all
Defined in:
lib/rubinius/ast/literals.rb

Instance Attribute Summary

Attributes inherited from DynamicString

#array, #options

Attributes inherited from StringLiteral

#string

Attributes inherited from Node

#line

Instance Method Summary collapse

Methods inherited from DynamicRegex

#initialize

Methods inherited from DynamicString

#defined, #initialize, #to_sexp

Methods inherited from StringLiteral

#defined, #initialize, #to_sexp

Methods inherited from Node

#ascii_graph, #attributes, #children, #defined, #initialize, match_arguments?, match_send?, #new_block_generator, #new_generator, #node_name, #or_bytecode, #pos, #set_child, #to_sexp, #transform, transform, transform_comment, transform_kind, transform_kind=, transform_name, #value_defined, #visit, #walk

Constructor Details

This class inherits a constructor from Rubinius::ToolSet.current::TS::AST::DynamicRegex

Instance Method Details

#bytecode(g) ⇒ Object



505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
# File 'lib/rubinius/ast/literals.rb', line 505

def bytecode(g)
  pos(g)

  idx = g.add_literal(nil)
  g.push_literal_at idx
  g.dup
  g.is_nil

  lbl = g.new_label
  g.gif lbl
  g.pop

  super(g)

  g.set_literal idx
  lbl.set!
end

#sexp_nameObject



523
524
525
# File 'lib/rubinius/ast/literals.rb', line 523

def sexp_name
  :dregx_once
end