Bug #99
instanceof across module boundaries
| Status: | Closed | Start: | 09/13/2009 | |
| Priority: | Urgent | Due date: | ||
| Assigned to: | % Done: | 100% |
||
| Category: | Core | |||
| Target version: | 0.8 | |||
| Severity: | Normal |
Description
So due to the way we try to sandbox modules from each other, instance of doesn't work across module boundaries. The 3 files attached show this problem. The interesting part is
exports.test_InstanceOf = function () {
var a1 = require('a1');
var a2 = require('a2');
asserts.instanceOf(a1.array(), Array, "Array in a1 is instanceof main Array");
asserts.instanceOf(a2.array(), Array, "Array in a2 is instanceof main Array");
asserts.instanceOf([1,2,3], Array, "sanity check");
}
The .array() functions are defined in the moudles and return [1,2,3]. Only the sanity check test of the 3 above passes.
History
Updated by Ash Berlin 348 days ago
- % Done changed from 0 to 100
- Status changed from New to Closed
module_scope branch was just merged back to master with fixes for this.