mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Prevent "already initialized constant Digest::VERSION"
20211117
T033003Z.log.html.gz
```
installing default gems from ext: /home/chkbuild/chkbuild/tmp/build/20211117T033003Z/lib/ruby/gems/3.1.0
/home/chkbuild/chkbuild/tmp/build/20211117T033003Z/ruby/ext/digest/lib/digest/version.rb:4: warning: already initialized constant Digest::VERSION
/home/chkbuild/chkbuild/tmp/build/20211117T033003Z/ruby/.ext/common/digest/version.rb:4: warning: previous definition of VERSION was here
```
This hack is copied from ext/psych/psych.gemspec
This commit is contained in:
parent
21b8f992de
commit
d23b3d9b7d
1 changed files with 5 additions and 2 deletions
|
@ -1,11 +1,14 @@
|
|||
# coding: utf-8
|
||||
# frozen_string_literal: true
|
||||
|
||||
require_relative 'lib/digest/version'
|
||||
version_module = Module.new do
|
||||
version_rb = File.join(__dir__, "lib/digest/version.rb")
|
||||
module_eval(File.read(version_rb), version_rb)
|
||||
end
|
||||
|
||||
Gem::Specification.new do |spec|
|
||||
spec.name = "digest"
|
||||
spec.version = Digest::VERSION
|
||||
spec.version = version_module::Digest::VERSION
|
||||
spec.authors = ["Akinori MUSHA"]
|
||||
spec.email = ["knu@idaemons.org"]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue