1
0
Fork 0
mirror of https://github.com/jashkenas/coffeescript.git synced 2022-11-09 12:23:24 -05:00

fixes #1630: in should check indices of the right operand when it can

pass a `hasOwnProperty` check for them
This commit is contained in:
Michael Ficarra 2011-08-26 15:42:37 -04:00
parent 8686e31271
commit 2ff6c4c3fc
5 changed files with 35 additions and 24 deletions

View file

@ -1,8 +1,8 @@
(function() {
var BALANCED_PAIRS, EXPRESSION_CLOSE, EXPRESSION_END, EXPRESSION_START, IMPLICIT_BLOCK, IMPLICIT_CALL, IMPLICIT_END, IMPLICIT_FUNC, IMPLICIT_UNSPACED_CALL, INVERSES, LINEBREAKS, SINGLE_CLOSERS, SINGLE_LINERS, left, rite, _i, _len, _ref;
var __indexOf = Array.prototype.indexOf || function(item) {
var __hasProp = Object.prototype.hasOwnProperty, __indexOf = Array.prototype.indexOf || function(item) {
for (var i = 0, l = this.length; i < l; i++) {
if (this[i] === item) return i;
if (__hasProp.call(this, i) && this[i] === item) return i;
}
return -1;
}, __slice = Array.prototype.slice;