[ruby/time] Expose Time::VERSION

https://github.com/ruby/time/commit/32793b56b7
This commit is contained in:
Hiroshi SHIBATA 2023-04-13 18:34:43 +09:00
Родитель cf77f7b5e7
Коммит f09638fe25
2 изменённых файлов: 12 добавлений и 2 удалений

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

@ -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 = "time" spec.name = name
spec.version = "0.2.2" spec.version = version
spec.authors = ["Tanaka Akira"] spec.authors = ["Tanaka Akira"]
spec.email = ["akr@fsij.org"] spec.email = ["akr@fsij.org"]

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

@ -25,6 +25,9 @@ require 'date'
# :startdoc: # :startdoc:
class Time class Time
VERSION = "0.2.2"
class << Time class << Time
# #