Rename YAML::VERSION. It's conflict with Psych::VERSION

This commit is contained in:
Hiroshi SHIBATA 2023-04-03 12:43:11 +09:00
parent b5c8c73f66
commit 27f709aa3c
No known key found for this signature in database
GPG Key ID: F9CF13417264FAC2
2 changed files with 2 additions and 2 deletions

View File

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

View File

@ -1,7 +1,7 @@
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
/^\s*LOADER_VERSION\s*=\s*"(.*)"/ =~ line and break $1
end rescue nil
end