[ruby/yaml] Expose YAML::VERSION

https://github.com/ruby/yaml/commit/8776bc2634
This commit is contained in:
Hiroshi SHIBATA 2023-03-30 14:19:53 +09:00 committed by git
parent 6dcd399976
commit ba4f01f0a0
2 changed files with 10 additions and 2 deletions

View File

@ -66,4 +66,5 @@ YAML = Psych # :nodoc:
#
# Syck can also be found on github: https://github.com/ruby/syck
module YAML
VERSION = "0.2.1"
end

View File

@ -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 = "yaml"
spec.version = "0.2.1"
spec.name = name
spec.version = version
spec.authors = ["Aaron Patterson", "SHIBATA Hiroshi"]
spec.email = ["aaron@tenderlovemaking.com", "hsbt@ruby-lang.org"]