Method: CodeTools::AST::ScopedConstant#defined

Defined in:
lib/rubinius/code/ast/constants.rb

#defined(g) ⇒ Object



61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# File 'lib/rubinius/code/ast/constants.rb', line 61

def defined(g)
  f = g.new_label
  done = g.new_label

  value_defined(g, f, false)

  g.pop
  g.push_literal "constant"
  g.goto done

  f.set!
  g.push_nil

  done.set!
end