src/opal.js
function const_lookup_ancestors(cref, name) {
    var i, ii, result, ancestors;

    if (cref == null) return;

    ancestors = Opal.ancestors(cref);

    for (i = 0, ii = ancestors.length; i < ii; i++) {
      if (ancestors[i].$$const && $hasOwn.call(ancestors[i].$$const, name)) {
        return ancestors[i].$$const[name];
      }
    }
  }
function const_lookup_ancestors(cref, name) {
    var i, ii, result, ancestors;

    if (cref == null) return;

    ancestors = Opal.ancestors(cref);

    for (i = 0, ii = ancestors.length; i < ii; i++) {
      if (ancestors[i].$$const && $hasOwn.call(ancestors[i].$$const, name)) {
        return ancestors[i].$$const[name];
      }
    }
  }
function const_lookup_ancestors ( cref , name ) { var i , ii , result , ancestors ; if ( cref == null ) return ; ancestors = Opal . ancestors ( cref ) ; for ( i = 0 , ii = ancestors . length ; i < ii ; i ++ ) { if ( ancestors [ i ] . $$const && $hasOwn . call ( ancestors [ i ] . $$const , name ) ) { return ancestors [ i ] . $$const [ name ] ; } } }
Walk up the ancestors chain looking for the constant
Walk up the ancestors chain looking for the constant