summaryrefslogtreecommitdiff
path: root/ext/zlib
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
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')
-rw-r--r--ext/zlib/zlib.c2
-rw-r--r--ext/zlib/zlib.gemspec6
2 files changed, 6 insertions, 2 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index 29c3a80..7753cc6 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -25,7 +25,7 @@
# define VALGRIND_MAKE_MEM_UNDEFINED(p, n) 0
#endif
-#define RUBY_ZLIB_VERSION "0.6.0"
+#define RUBY_ZLIB_VERSION "1.0.0"
#ifndef GZIP_SUPPORT
#define GZIP_SUPPORT 1
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]