summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/fiddle/fiddle.gemspec10
-rw-r--r--ext/fiddle/lib/fiddle/version.rb3
2 files changed, 12 insertions, 1 deletions
diff --git a/ext/fiddle/fiddle.gemspec b/ext/fiddle/fiddle.gemspec
index fb62c318a7..49a19e399b 100644
--- a/ext/fiddle/fiddle.gemspec
+++ b/ext/fiddle/fiddle.gemspec
@@ -1,7 +1,15 @@
# frozen_string_literal: true
+
+begin
+ require_relative "lib/fiddle/version"
+rescue LoadError
+ # for Ruby core repository
+ require_relative "version"
+end
+
Gem::Specification.new do |spec|
spec.name = "fiddle"
- spec.version = '1.0.0'
+ spec.version = Fiddle::VERSION
spec.authors = ["Aaron Patterson", "SHIBATA Hiroshi"]
spec.email = ["aaron@tenderlovemaking.com", "hsbt@ruby-lang.org"]
diff --git a/ext/fiddle/lib/fiddle/version.rb b/ext/fiddle/lib/fiddle/version.rb
new file mode 100644
index 0000000000..235d3c0344
--- /dev/null
+++ b/ext/fiddle/lib/fiddle/version.rb
@@ -0,0 +1,3 @@
+class Fiddle
+ VERSION = "1.0.0"
+end