diff --git a/lib/open3/open3.gemspec b/lib/open3/open3.gemspec index 6c7220703b..a33fca7444 100644 --- a/lib/open3/open3.gemspec +++ b/lib/open3/open3.gemspec @@ -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