зеркало из https://github.com/github/ruby.git
[ruby/set] Expose Set::VERSION
https://github.com/ruby/set/commit/d39b33f463
This commit is contained in:
Родитель
c301ba0a66
Коммит
15796ae1e8
|
@ -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"]
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче