Skip to content

Commit

Permalink
[js] Make nqp::isrwcont work on Scalars.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmurias committed Jan 21, 2017
1 parent c1d4a2d commit 2474adb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/vm/js/perl6-runtime/runtime.js
Expand Up @@ -225,6 +225,12 @@ RakudoScalar.prototype.setupSTable = function() {
this.STable.addInternalMethod('$$iscont', function() {
return 1;
});

this.STable.addInternalMethod('$$isrwcont', function() {
if (this.typeObject_) return 0;
var desc = this.$$getattr(Scalar, '$!descriptor', desc);
return desc.$$getattr_i(ContainerDescriptor, '$!rw');
});
};


Expand Down

0 comments on commit 2474adb

Please sign in to comment.