class Opal::Nodes::ConstNode
def compile
def compile if magical_data_const? push("$__END__") elsif const_scope push "Opal.const_get_qualified(", recv(const_scope), ", '#{name}')" elsif compiler.eval? push "Opal.const_get_relative($nesting, '#{name}')" else push "Opal.const_get_relative($nesting, '#{name}')" end end
def magical_data_const?
2. When current file doesn't have __END__ section
DATA const should be resolved to the string located after __END__
1. When current file contains __END__ in the end of the file
that should be processed in a different way:
Ruby has a magical const DATA
def magical_data_const? const_scope.nil? && name == :DATA and compiler.eof_content end