Bug of Node Port call to Ruby solved magically.
@@ -48,7 +48,7 @@ describe('metacall', () => {
assert.strictEqual(require('example.py'), undefined); /* TODO: Do not return undefined */
});
it('metacall_load_from_file (rb)', () => {
- assert.strictEqual(/*require('second.rb')*/ undefined, undefined); /* TODO: Do not return undefined */
+ assert.strictEqual(require('second.rb'), undefined); /* TODO: Do not return undefined */
});
});
@@ -71,17 +71,7 @@ describe('metacall', () => {
assert.deepEqual(metacall('return_same_array', [4, 5, 6]), [4, 5, 6]);
});
it('metacall (rb)', () => {
- /* TODO: This creates a segmentation fault, it seems due to lack of thread-safety */
- /*
- 54: -- C level backtrace information -------------------------------------------
- 54: /usr/lib/x86_64-linux-gnu/libruby-2.3.so.2.3 [0x7fcfd8d27025]
- 54: /usr/lib/x86_64-linux-gnu/libruby-2.3.so.2.3 [0x7fcfd8d2725c]
- 54: /usr/lib/x86_64-linux-gnu/libruby-2.3.so.2.3 [0x7fcfd8c00904]
- 54: /usr/lib/x86_64-linux-gnu/libruby-2.3.so.2.3 [0x7fcfd8cb281e]
- 54: /lib/x86_64-linux-gnu/libpthread.so.0 [0x7fcfdd60a0e0]
- 54: [0x3089380fa9ff]
- */
- /* assert.strictEqual(metacall('get_second', 5, 12), 12); */
+ assert.strictEqual(metacall('get_second', 5, 12), 12);
});
});
});
