[ruby/set] Expose Set::VERSION
https://github.com/ruby/set/commit/d39b33f463
This commit is contained in:
parent
c301ba0a66
commit
15796ae1e8
@ -216,6 +216,9 @@
|
|||||||
# has been modified while an element in the set.
|
# has been modified while an element in the set.
|
||||||
#
|
#
|
||||||
class Set
|
class Set
|
||||||
|
|
||||||
|
VERSION = "1.0.3"
|
||||||
|
|
||||||
include Enumerable
|
include Enumerable
|
||||||
|
|
||||||
# Creates a new set containing the given objects.
|
# Creates a new set containing the given objects.
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
|
name = File.basename(__FILE__, ".gemspec")
|
||||||
|
version = ["lib", Array.new(name.count("-")+1, "..").join("/")].find do |dir|
|
||||||
|
break File.foreach(File.join(__dir__, dir, "#{name.tr('-', '/')}.rb")) do |line|
|
||||||
|
/^\s*VERSION\s*=\s*"(.*)"/ =~ line and break $1
|
||||||
|
end rescue nil
|
||||||
|
end
|
||||||
|
|
||||||
Gem::Specification.new do |spec|
|
Gem::Specification.new do |spec|
|
||||||
spec.name = "set"
|
spec.name = name
|
||||||
spec.version = "1.0.3"
|
spec.version = version
|
||||||
spec.authors = ["Akinori MUSHA"]
|
spec.authors = ["Akinori MUSHA"]
|
||||||
spec.email = ["knu@idaemons.org"]
|
spec.email = ["knu@idaemons.org"]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user