1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Fixed filename for Open3::VERSION

This commit is contained in:
Hiroshi SHIBATA 2021-12-09 19:48:22 +09:00
parent b06e37e242
commit 4258c8df86
No known key found for this signature in database
GPG key ID: F9CF13417264FAC2

View file

@ -2,7 +2,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|
break File.foreach(File.join(__dir__, dir, "#{name.tr('-', '/')}/version.rb")) do |line|
/^\s*VERSION\s*=\s*"(.*)"/ =~ line and break $1
end rescue nil
end