Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #11533: version_for_git.diff

File version_for_git.diff, 1.1 kB (added by jdalton, 3 months ago)
  • a/src/selector.js

    old new  
    6161      return; 
    6262    } 
    6363     
    64     this.matcher = ["this.matcher = function(root) {",  
    65                     "var r = root, h = Selector.handlers, c = false, n;"]; 
     64    this.matcher = ["var r = root, h = Selector.handlers, c = false, n;"]; 
    6665 
    6766    while (e && le != e && (/\S/).test(e)) { 
    6867      le = e; 
     
    7776      } 
    7877    } 
    7978     
    80     this.matcher.push("return h.unique(n);\n}"); 
    81     eval(this.matcher.join('\n')); 
     79    this.matcher.push("return h.unique(n);"); 
     80    this.matcher = new Function('root', this.matcher.join('\n')); 
    8281    Selector._cache[this.expression] = this.matcher; 
    8382  }, 
    8483