[ruby/pathname] Expose Pathname::VERSION

https://github.com/ruby/pathname/commit/2b0b1a82ee
This commit is contained in:
Hiroshi SHIBATA 2023-04-14 11:06:40 +09:00
Родитель 389ea0ae4c
Коммит 8a06f1a69f
2 изменённых файлов: 11 добавлений и 2 удалений

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

@ -14,6 +14,8 @@ require 'pathname.so'
class Pathname
VERSION = "0.2.1"
# :stopdoc:
# to_path is implemented so Pathname objects are usable with File.open, etc.

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

@ -1,6 +1,13 @@
name = File.basename(__FILE__, ".gemspec")
version = ["lib", "ext/lib"].find do |dir|
break File.foreach(File.join(__dir__, dir, "#{name}.rb")) do |line|
/^\s*VERSION\s*=\s*"(.*)"/ =~ line and break $1
end rescue nil
end
Gem::Specification.new do |spec|
spec.name = "pathname"
spec.version = "0.2.1"
spec.name = name
spec.version = version
spec.authors = ["Tanaka Akira"]
spec.email = ["akr@fsij.org"]