Skip to content

Commit 7e1cb00

Browse files
committed
Fix README using File.exist? instead of File.exists?
The latter is deprecated since Ruby 2.1.0. ref: http://docs.ruby-lang.org/en/2.2.0/File.html#method-c-exists-3F And `File.exist?` works fine for older Ruby versions.
1 parent 758860b commit 7e1cb00

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.markdown

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ We can replace the mod_rewrite rules with the following Rack::Rewrite rule:
155155
```ruby
156156
maintenance_file = File.join(RAILS_ROOT, 'public', 'system', 'maintenance.html')
157157
send_file /.*/, maintenance_file, :if => Proc.new { |rack_env|
158-
File.exists?(maintenance_file) && rack_env['PATH_INFO'] !~ /\.(css|jpg|png)/
158+
File.exist?(maintenance_file) && rack_env['PATH_INFO'] !~ /\.(css|jpg|png)/
159159
}
160160
```
161161

0 commit comments

Comments
 (0)