mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[ruby/reline] Load correct version.rb from gemspec
When merged to ruby/ruby, reline.gemspec file is located under
lib/reline, as the same as reline/version.rb. That is the latter
path relative from the former differs from the ruby/reline case,
and the reline/version.rb in the default load path will be loaded.
Try `require_relative` not to load unexpected files.
54905d0e1b
This commit is contained in:
parent
7159af3491
commit
a81e0600a7
1 changed files with 5 additions and 3 deletions
|
@ -1,7 +1,9 @@
|
||||||
|
|
||||||
lib = File.expand_path('../lib', __FILE__)
|
begin
|
||||||
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
require_relative 'lib/reline/version'
|
||||||
require 'reline/version'
|
rescue LoadError
|
||||||
|
require_relative 'version'
|
||||||
|
end
|
||||||
|
|
||||||
Gem::Specification.new do |spec|
|
Gem::Specification.new do |spec|
|
||||||
spec.name = 'reline'
|
spec.name = 'reline'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue