From e4552b3db07fb5fb4816eae89f7feed50e5cd629 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 25 Oct 2009 16:58:01 -0700 Subject: rev: do not File.expand_path on result of body.to_path Rack::Lint requires File::exist? to be true on this, so there's no need to expand the path name to resolve it here. --- lib/rainbows/rev.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/rainbows') diff --git a/lib/rainbows/rev.rb b/lib/rainbows/rev.rb index 89f893a..e726ad2 100644 --- a/lib/rainbows/rev.rb +++ b/lib/rainbows/rev.rb @@ -118,7 +118,7 @@ module Rainbows # here since we can't get here without checking to_path first io = body.to_io if body.respond_to?(:to_io) io ||= ::IO.new($1.to_i) if body.to_path =~ %r{\A/dev/fd/(\d+)\z} - io ||= File.open(File.expand_path(body.to_path), 'rb') + io ||= File.open(body.to_path, 'rb') st = io.stat if st.socket? || st.pipe? -- cgit v1.2.3-24-ge0c7