mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
SERVER-854: unplugging NumberInt as being automatically created from bson int values, breaks many behaviors
This commit is contained in:
parent
7b24e34433
commit
a057d6d68e
@ -58,4 +58,6 @@ assert( 5 == NumberInt( 5 ) , "eq" );
|
||||
assert( 5 < NumberInt( 6 ) , "lt" );
|
||||
assert( 5 > NumberInt( 4 ) , "lt" );
|
||||
assert( NumberInt( 1 ) , "to bool a" );
|
||||
//assert( ! NumberInt( 0 ) , "to bool b" ); // SERVER-3366
|
||||
|
||||
// objects are always considered thruthy
|
||||
//assert( ! NumberInt( 0 ) , "to bool b" );
|
||||
|
@ -591,9 +591,10 @@ namespace mongo {
|
||||
case Undefined:
|
||||
return JSVAL_NULL;
|
||||
case NumberDouble:
|
||||
return toval( e.number() );
|
||||
case NumberInt:
|
||||
return toval( e.numberInt() );
|
||||
return toval( e.number() );
|
||||
// case NumberInt:
|
||||
// return toval( e.numberInt() );
|
||||
case Symbol: // TODO: should we make a special class for this
|
||||
case String:
|
||||
return toval( e.valuestr() );
|
||||
|
Loading…
Reference in New Issue
Block a user