diff options
-rw-r--r-- | instruby.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/instruby.rb b/instruby.rb index be68feb57..5548fa1f9 100644 --- a/instruby.rb +++ b/instruby.rb @@ -262,8 +262,8 @@ install?(:local, :comm, :bin) do if ruby_bin_dosish batfile = File.join(bindir, name + ".bat") - open_for_install(batfile, "w") {|b| - b.print(<<EOH+shebang+body+<<EOF) + open_for_install(batfile, "wb") {|b| + b.print((<<EOH+shebang+body+<<EOF).gsub(/\r?\n/, "\r\n")) @echo off @if not "%~d0" == "~d0" goto WinNT #{ruby_bin_dosish} -x "#{batfile}" %1 %2 %3 %4 %5 %6 %7 %8 %9 |