|
406 | 406 | // calling original JS constructors
|
407 | 407 | constructor = function() {
|
408 | 408 | var args = $slice.call(arguments),
|
409 |
| - self = new ($bind.apply(superclass, [null].concat(args)))(); |
| 409 | + self = new ($bind.apply(superclass.$$constructor, [null].concat(args)))(); |
410 | 410 |
|
411 | 411 | // and replacing a __proto__ manually
|
412 | 412 | $setPrototype(self, klass.$$prototype);
|
|
420 | 420 | $defineProperty(constructor, 'displayName', '::'+name);
|
421 | 421 |
|
422 | 422 | $defineProperty(klass, '$$name', name);
|
| 423 | + $defineProperty(klass, '$$constructor', constructor); |
423 | 424 | $defineProperty(klass, '$$prototype', constructor.prototype);
|
424 | 425 | $defineProperty(klass, '$$const', {});
|
425 | 426 | $defineProperty(klass, '$$is_class', true);
|
|
1186 | 1187 | $defineProperty(constructor, '$$ancestors', []);
|
1187 | 1188 | $defineProperty(constructor, '$$ancestors_cache_version', null);
|
1188 | 1189 | $setPrototype(constructor, Opal.Class.prototype);
|
| 1190 | + $defineProperty(constructor, '$$bridge', klass); |
| 1191 | + $defineProperty(klass, 'constructor', constructor); |
| 1192 | + $defineProperty(klass, '$$constructor', constructor); |
1189 | 1193 | };
|
1190 | 1194 |
|
1191 | 1195 | function protoToModule(proto) {
|
|
0 commit comments