Class: CodeTools::AST::While

Inherits:
Node
  • Object
show all
Defined in:
lib/rubinius/code/compiler/evaluator.rb

Direct Known Subclasses

Until

Instance Method Summary collapse

Instance Method Details

#execute(e) ⇒ Object



158
159
160
161
162
163
164
165
166
167
168
# File 'lib/rubinius/code/compiler/evaluator.rb', line 158

def execute(e)
  if @check_first
    while @condition.execute(e)
      @body.execute(e)
    end
  else
    begin
      @body.execute(e)
    end while @condition.execute(e)
  end
end