Skip to content

Commit 375d513

Browse files
committed
Prefer File.exist? to File.exists?
File.exists was deprecated a long time ago and removed in Ruby 3.4, which JRuby 10 is compatible with. (cherry picked from commit be1272e)
1 parent fceebed commit 375d513

File tree

7 files changed

+7
-6
lines changed

7 files changed

+7
-6
lines changed

History.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
## 1.2.3
22

3+
- Adds basic compatibility with JRuby 10.0
34
- update (bundled) rack to 2.2.13
45
- Corrects Rack 2.x compatibility when used with modern Rails, and requires Rack 2.x going forward
56
- forward ports all 1.1.x fixes to the 1.2.x stream which were omitted in 1.2.2 release (#262)

examples/rails3/config/boot.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
# Set up gems listed in the Gemfile.
44
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
55

6-
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
6+
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])

src/main/ruby/jruby/rack/rails/extensions2.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ module Rescue
3838
def render_optional_error_file(status_code) #:nodoc:
3939
status = interpret_status(status_code)
4040
path = "#{PUBLIC_ROOT}/#{status[0,3]}.html"
41-
if File.exists?(path)
41+
if File.exist?(path)
4242
render :file => path, :status => status
4343
else
4444
head status

src/spec/stub/rails30/WEB-INF/config/boot.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
# Set up gems listed in the Gemfile.
44
ENV['BUNDLE_GEMFILE'] = File.expand_path('../../Gemfile', __FILE__)
55

6-
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
6+
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])

src/spec/stub/rails31/WEB-INF/config/boot.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
# Set up gems listed in the Gemfile.
44
ENV['BUNDLE_GEMFILE'] = File.expand_path('../../Gemfile', __FILE__)
55

6-
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
6+
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])

src/spec/stub/rails32/WEB-INF/config/boot.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
# Set up gems listed in the Gemfile.
44
ENV['BUNDLE_GEMFILE'] = File.expand_path('../../Gemfile', __FILE__)
55

6-
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
6+
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Set up gems listed in the Gemfile.
22
ENV['BUNDLE_GEMFILE'] = File.expand_path('../../Gemfile', __FILE__)
33

4-
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
4+
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])

0 commit comments

Comments
 (0)