summaryrefslogtreecommitdiff
path: root/bundler.gemspec
diff options
context:
space:
mode:
authorSHIBATA Hiroshi <hsbt@ruby-lang.org>2018-11-06 20:29:55 +0000
committerSHIBATA Hiroshi <hsbt@ruby-lang.org>2018-11-06 20:29:55 +0000
commit359b6920c45fa05b92259ca284de16c65ed71ac1 (patch)
tree3e0505eec872db8bc4dc5a761c0b961333508552 /bundler.gemspec
parentabb17aa367f666ff78e3cf51008ba2ec4144f21a (diff)
downloadbundler-359b6920c45fa05b92259ca284de16c65ed71ac1.tar.gz
To use File.file? instead of handling LoadError.
Diffstat (limited to 'bundler.gemspec')
-rw-r--r--bundler.gemspec7
1 files changed, 4 insertions, 3 deletions
diff --git a/bundler.gemspec b/bundler.gemspec
index c004de0965..bffcbd4ec2 100644
--- a/bundler.gemspec
+++ b/bundler.gemspec
@@ -1,9 +1,10 @@
# coding: utf-8
# frozen_string_literal: true
-begin
- require File.expand_path("../lib/bundler/version", __FILE__)
-rescue LoadError
+version = File.expand_path("../lib/bundler/version", __FILE__)
+if File.file?(version)
+ require version
+else
# for Ruby core repository
require File.expand_path("../bundler/version", __FILE__)
end