Permalink
Browse files

Avoid warning on 1.8.7 regarding File.to_path

  • Loading branch information...
manveru committed Jun 8, 2010
1 parent 631ec2d commit 26513ebbf23b45ac28fae244092a6c38c9df0383
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/rack/sendfile.rb
View
@@ -2,7 +2,9 @@
module Rack
class File #:nodoc:
- alias :to_path :path
+ unless instance_methods(false).include?('to_path')
+ alias :to_path :path
+ end
end
# = Sendfile

0 comments on commit 26513eb

Please sign in to comment.