Skip to content

Commit

Permalink
hacks for NumberInt
Browse files Browse the repository at this point in the history
  • Loading branch information
erh committed Jul 5, 2011
1 parent 6a83cf2 commit 2116b44
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions shell/servers.js
Expand Up @@ -1099,6 +1099,15 @@ ReplSetTest.prototype.getPort = function( n ){
}
}
}

if ( typeof(n) == "object" && n.floatApprox )
n = n.floatApprox

// this is a hack for NumberInt
if ( n == 0 )
n = 0;

print( "n: " + n + " ports: " + tojson( this.ports ) + "\t" + this.ports[n] + " " + typeof(n) );
return this.ports[ n ];
}

Expand Down

0 comments on commit 2116b44

Please sign in to comment.