diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-02-10 13:18:13 -0600 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-02-10 13:18:13 -0600 |
commit | 5689e681e9ec5824de6bc2b667b5bee3920bf91f (patch) | |
tree | e9ead37e53d83fa971a731ab72c17e1d84f7c123 /actionpack/lib/action_controller/vendor/rack-1.0/rack/lint.rb | |
parent | f400209084fabb00e18c3325e1933f4543fce94c (diff) | |
download | rails-5689e681e9ec5824de6bc2b667b5bee3920bf91f.tar.gz rails-5689e681e9ec5824de6bc2b667b5bee3920bf91f.tar.bz2 rails-5689e681e9ec5824de6bc2b667b5bee3920bf91f.zip |
Update vendored rack
Diffstat (limited to 'actionpack/lib/action_controller/vendor/rack-1.0/rack/lint.rb')
-rw-r--r-- | actionpack/lib/action_controller/vendor/rack-1.0/rack/lint.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/vendor/rack-1.0/rack/lint.rb b/actionpack/lib/action_controller/vendor/rack-1.0/rack/lint.rb index 53e54955b7..7eb05437f0 100644 --- a/actionpack/lib/action_controller/vendor/rack-1.0/rack/lint.rb +++ b/actionpack/lib/action_controller/vendor/rack-1.0/rack/lint.rb @@ -442,6 +442,18 @@ module Rack ## If the Body responds to #close, it will be called after iteration. # XXX howto: assert("Body has not been closed") { @closed } + + ## + ## If the Body responds to #to_path, it must return a String + ## identifying the location of a file whose contents are identical + ## to that produced by calling #each. + + if @body.respond_to?(:to_path) + assert("The file identified by body.to_path does not exist") { + ::File.exist? @body.to_path + } + end + ## ## The Body commonly is an Array of Strings, the application ## instance itself, or a File-like object. |