Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Support mixing :foo, and |%args in the same method call.
Pass test 25.
  • Loading branch information
pmurias committed Dec 1, 2014
1 parent b0085d8 commit 46678fd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/vm/js/bin/run_tests
@@ -1,5 +1,5 @@
#!/bin/bash
# 19 and 30 where moved out as they were parrot specific, 52,54 is missing, we can't pass 49 till we are bootstraped
#echo 'No tests pass as we are in the early stages of a rewrite/refactor'
prove -e './nqp-js' t/nqp/{01..17}* t/nqp/{20,22,23,36,37,38,40,41,42,46,48,53,63,68,81,83}* t/js/getcomp-js.t
prove -e './nqp-js' t/nqp/{01..17}* t/nqp/{20,22,23,25,36,37,38,40,41,42,46,48,53,63,68,81,83}* t/js/getcomp-js.t
#prove -e './nqp-js' t/nqp/{01..29}*.t t/nqp/{31..48}* t/nqp/{50,51,53}* t/nqp/{55..81}* t/nqp/83* t/serialization/0{2,3}*.t
10 changes: 10 additions & 0 deletions src/vm/js/nqp-runtime/core.js
Expand Up @@ -146,6 +146,16 @@ exports.slurpy_named = function(named) {
return hash;
};

exports.named = function(parts) {
var all = {};
for (var i=0; i < parts.length; i++) {
for (var key in parts[i]) {
all[key] = parts[i][key];
}
}
return all;
};

exports.op.ishash = function(obj) {
return obj instanceof Hash ? 1 : 0;
};
Expand Down
1 change: 1 addition & 0 deletions src/vm/js/nqp-runtime/runtime.js
Expand Up @@ -11,6 +11,7 @@ var core = require('./core');
load_ops(core);
exports.hash = core.hash;
exports.slurpy_named = core.slurpy_named;
exports.named = core.named;

var io = require('./io.js');
load_ops(io);
Expand Down

0 comments on commit 46678fd

Please sign in to comment.