summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorSutou Kouhei <kou@clear-code.com>2020-04-18 15:51:03 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-05-23 14:29:16 +0900
commit13f64333ea6c6b904274cb1a95d2bc82236e9237 (patch)
treebed3e4921db0355e8ea7261eba5ed06c6bf42b72 /ext
parent5fb7ca33e6137ca41d9f320738e3871eecda28e5 (diff)
[ruby/fiddle] Add Fiddle::VERSION
https://github.com/ruby/fiddle/commit/9dcf64c096
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3068
Diffstat (limited to 'ext')
-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