Skip to content

Commit

Permalink
Modify nqp::cwd on parrot to be consistent with jvm, moar.
Browse files Browse the repository at this point in the history
  • Loading branch information
donaldh committed May 28, 2014
1 parent 5cebf27 commit 6aa177f
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/vm/parrot/QAST/Operations.nqp
Expand Up @@ -1873,11 +1873,15 @@ QAST::Operations.add_core_op('cwd', -> $qastcomp, $op {
if +$op.list != 0 {
nqp::die("The 'cwd' op expects no operands");
}
$qastcomp.as_post(QAST::Op.new(
:op('callmethod'),
:name('cwd'),
QAST::VM.new( :pirop('new__Ps'),
QAST::SVal.new( :value('OS') ) ) ) );
$qastcomp.as_post(QAST::VM.new( :pirop('trans_encoding__Ssi'),
QAST::Op.new(
:op('callmethod'),
:name('cwd'),
QAST::VM.new( :pirop('new__Ps'),
QAST::SVal.new( :value('OS') ) ) ),
QAST::VM.new( :pirop('find_encoding__Is'),
QAST::SVal.new( :value('utf8') ) )
));
});
QAST::Operations.add_core_op('chdir', -> $qastcomp, $op {
if +$op.list != 1 {
Expand Down

0 comments on commit 6aa177f

Please sign in to comment.