summaryrefslogtreecommitdiff
path: root/ext/zlib/zlib.gemspec
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-18 00:55:05 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-18 00:55:05 +0000
commitfd360dd93abe77fd18992b715c7ad295d1dfd02a (patch)
treeac640197dd9fd0b22d886311ffcd8073be9d3d20 /ext/zlib/zlib.gemspec
parent6db7b1c55a61db6f1e5faa08f087783288de1c9e (diff)
zlib: fix Zlib::VERSION
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/zlib/zlib.gemspec')
-rw-r--r--ext/zlib/zlib.gemspec6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/zlib/zlib.gemspec b/ext/zlib/zlib.gemspec
index a234c1d..f5b6443 100644
--- a/ext/zlib/zlib.gemspec
+++ b/ext/zlib/zlib.gemspec
@@ -1,8 +1,12 @@
# coding: utf-8
# frozen_string_literal: true
+source_version = File.open(File.join(__dir__, "zlib.c")) {|f|
+ f.gets("\n#define RUBY_ZLIB_VERSION ")
+ f.gets[/\s*(".+")/, 1].undump
+}
Gem::Specification.new do |spec|
spec.name = "zlib"
- spec.version = "1.0.0"
+ spec.version = source_version
spec.authors = ["Yukihiro Matsumoto", "UENO Katsuhiro"]
spec.email = ["matz@ruby-lang.org", nil]