[ruby/pathname] Expose Pathname::VERSION
https://github.com/ruby/pathname/commit/2b0b1a82ee
This commit is contained in:
parent
389ea0ae4c
commit
8a06f1a69f
@ -14,6 +14,8 @@ require 'pathname.so'
|
|||||||
|
|
||||||
class Pathname
|
class Pathname
|
||||||
|
|
||||||
|
VERSION = "0.2.1"
|
||||||
|
|
||||||
# :stopdoc:
|
# :stopdoc:
|
||||||
|
|
||||||
# to_path is implemented so Pathname objects are usable with File.open, etc.
|
# 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|
|
Gem::Specification.new do |spec|
|
||||||
spec.name = "pathname"
|
spec.name = name
|
||||||
spec.version = "0.2.1"
|
spec.version = version
|
||||||
spec.authors = ["Tanaka Akira"]
|
spec.authors = ["Tanaka Akira"]
|
||||||
spec.email = ["akr@fsij.org"]
|
spec.email = ["akr@fsij.org"]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user