Permalink
Browse files

Fixes #2

  • Loading branch information...
1 parent bf58a83 commit d10871304955de180dd3520ff36873e466c69741 @molnarg committed Aug 19, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/extensions/Array.js
  2. +1 −1 lib/extensions/String.js
View
@@ -58,7 +58,7 @@ Array.of = function() {
// Possible signatures : (schema)
// (length, schema)
// (minLength, maxLength, schema)
- var args = Array.prototype.reverse.call(arguments)
+ var args = Array.prototype.slice.call(arguments).reverse()
if (args.length === 2) args[2] = args[1]
return new ArraySchema(Schema.fromJS(args[0]), args[1], args[2])
}
View
@@ -4,7 +4,7 @@ String.of = function() {
// Possible signatures : (charset)
// (length, charset)
// (minLength, maxLength, charset)
- var args = Array.prototype.reverse.call(arguments)
+ var args = Array.prototype.slice.call(arguments).reverse()
, charset = args[0] ? ('[' + args[0] + ']') : '[a-zA-Z0-9]'
, max = args[1]
, min = (args.length > 2) ? args[2] : args[1]

0 comments on commit d108713

Please sign in to comment.