about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2015-04-22 00:36:51 +0000
committerEric Wong <e@80x24.org>2015-04-22 00:58:52 +0000
commit36f89035e0631f529d748a053b5f8d899279d198 (patch)
tree4ae395e88d9ed637dd416f74e6cce2331ddb3f1b /lib
parent5328992829b2ff76cd7cda6d1911ecad70f0e8c2 (diff)
downloadyahns-36f89035e0631f529d748a053b5f8d899279d198.tar.gz
We may set binary mode upon open by passing "b" in the mode string,
so avoid the extra method dispatch and bytecode/cache overhead that
entails.
Diffstat (limited to 'lib')
-rw-r--r--lib/yahns/config.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/yahns/config.rb b/lib/yahns/config.rb
index 9db0d59..f4164a9 100644
--- a/lib/yahns/config.rb
+++ b/lib/yahns/config.rb
@@ -400,9 +400,8 @@ class Yahns::Config # :nodoc:
     var = _check_in_block(:app, :errors)
     if String === val
       # we've already bound working_directory by the time we get here
-      val = File.open(File.expand_path(val), "a")
+      val = File.open(File.expand_path(val), "ab")
       val.close_on_exec = val.sync = true
-      val.binmode
     else
       rt = [ :puts, :write, :flush ] # match Rack::Lint
       rt.all? { |m| val.respond_to?(m) } or raise ArgumentError,