We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c49975 commit 294a1feCopy full SHA for 294a1fe
src/HLL/Compiler.nqp
@@ -259,7 +259,8 @@ class HLL::Compiler does HLL::Backend::Default {
259
!! nqp::open($output, 'w');
260
self.panic("Cannot write to $output") unless $fh;
261
nqp::printfh($fh, $result);
262
- nqp::closefh($fh);
+ nqp::flushfh($fh);
263
+ nqp::closefh($fh) unless ($output eq '' || $output eq '-');
264
}
265
CATCH {
266
$has_error := 1;
@@ -448,7 +449,9 @@ class HLL::Compiler does HLL::Backend::Default {
448
449
450
method dumper($obj, $name, *%options) {
451
if nqp::can($obj, 'dump') {
- nqp::print($obj.dump());
452
+ my $out := nqp::getstdout();
453
+ nqp::printfh($out, $obj.dump());
454
+ nqp::flushfh($out);
455
456
else {
457
nqp::die("Cannot dump this object; no dump method");
0 commit comments