[ruby/set] Expose Set::VERSION

https://github.com/ruby/set/commit/d39b33f463
This commit is contained in:
Hiroshi SHIBATA 2023-03-30 14:08:23 +09:00 коммит произвёл git
Родитель c301ba0a66
Коммит 15796ae1e8
2 изменённых файлов: 12 добавлений и 2 удалений

Просмотреть файл

@ -216,6 +216,9 @@
# has been modified while an element in the set.
#
class Set
VERSION = "1.0.3"
include Enumerable
# 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|
spec.name = "set"
spec.version = "1.0.3"
spec.name = name
spec.version = version
spec.authors = ["Akinori MUSHA"]
spec.email = ["knu@idaemons.org"]