ruby-changes:59087
From: Kazuhiro <ko1@a...>
Date: Thu, 5 Dec 2019 18:19:18 +0900 (JST)
Subject: [ruby-changes:59087] 4c88107c54 (master): Fix `warning: already initialized constant DidYouMean::VERSION`
https://git.ruby-lang.org/ruby.git/commit/?id=4c88107c54 From 4c88107c54b06c1a3e89970eb243c8ac887d84e1 Mon Sep 17 00:00:00 2001 From: Kazuhiro NISHIYAMA <zn@m...> Date: Thu, 5 Dec 2019 18:14:31 +0900 Subject: Fix `warning: already initialized constant DidYouMean::VERSION` ``` .../gems/did_you_mean-1.3.1/lib/did_you_mean/version.rb:2: warning: already initialized constant DidYouMean::VERSION .../lib/did_you_mean/version.rb:2: warning: previous definition of VERSION was here ``` diff --git a/lib/did_you_mean/did_you_mean.gemspec b/lib/did_you_mean/did_you_mean.gemspec index 8a74db8..8fe5723 100644 --- a/lib/did_you_mean/did_you_mean.gemspec +++ b/lib/did_you_mean/did_you_mean.gemspec @@ -1,7 +1,11 @@ https://github.com/ruby/ruby/blob/trunk/lib/did_you_mean/did_you_mean.gemspec#L1 # coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) -require 'did_you_mean/version' +begin + require_relative "lib/did_you_mean/version" +rescue LoadError # Fallback to load version file in ruby core repository + require_relative "version" +end Gem::Specification.new do |spec| spec.name = "did_you_mean" -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/