summaryrefslogtreecommitdiff
path: root/B/Bytecode.pm
diff options
context:
space:
mode:
Diffstat (limited to 'B/Bytecode.pm')
-rw-r--r--B/Bytecode.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/B/Bytecode.pm b/B/Bytecode.pm
index 4fb42ac853..447bd3700a 100644
--- a/B/Bytecode.pm
+++ b/B/Bytecode.pm
@@ -675,6 +675,7 @@ sub bytecompile_main {
sub prepare_assemble {
my $newfh = IO::File->new_tmpfile;
select($newfh);
+ binmode $newfh;
return $newfh;
}
@@ -688,6 +689,7 @@ sub compile {
my @options = @_;
my ($option, $opt, $arg);
open(OUT, ">&STDOUT");
+ binmode OUT;
select(OUT);
OPTION:
while ($option = shift @options) {
@@ -704,6 +706,7 @@ sub compile {
} elsif ($opt eq "o") {
$arg ||= shift @options;
open(OUT, ">$arg") or return "$arg: $!\n";
+ binmode OUT;
} elsif ($opt eq "D") {
$arg ||= shift @options;
foreach $arg (split(//, $arg)) {