-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.0.3, 2.1.0
-
Component/s: JavaScript
-
None
-
Environment:I think in all environment, but my is "Linux azat 2.6.38custom1.0 #1 SMP Mon May 23 17:17:08 MSD 2011 x86_64 GNU/Linux"
-
ALL
/** * js increment operators (ob.prop += ob2.prop) do not work, after assigment like this ob = ob2 * * Affected versions: r2.1.0-1580-g0c1a6bd (v8) * v8 engine: Version 3.9.23 * * 2.0.3-1 (spider monkey) */ db.eval(function() { var ob2 = null; var ob1 = {foo: 1}; ob2 = ob1; // if uncomment, than works // ob2 = {}; // for (i in ob1) { // ob2[i] = ob1[i]; // } ob2.foo += ob1.foo; assert(2 == ob2.foo, "increment #2, must be: 2"); assert(ob2.foo == (1 + ob1.foo), "increment #1, must be: " + ob2.foo); return ob2.foo; });
- is duplicated by
-
SERVER-5417 js add property do not work at emit()
- Closed
-
SERVER-8624 Remove read-only constraint on Reduce function values
- Closed