Skip to content

Commit

Permalink
Remove unnecessary isArray check in Array#[]=
Browse files Browse the repository at this point in the history
  • Loading branch information
adambeynon committed Sep 20, 2013
1 parent 087cc6a commit 2651a89
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions corelib/array.rb
Expand Up @@ -303,12 +303,7 @@ def []=(index, value, extra = undefined)
}
}
if (extra._isArray) {
#{self}.splice.apply(#{self}, [index, value].concat(extra));
}
else {
#{self}.splice(index, value, extra);
}
#{self}.splice.apply(#{self}, [index, value].concat(extra));
return extra;
}
Expand Down

0 comments on commit 2651a89

Please sign in to comment.