From 934552618e8b8a71b3910fdb35ee65f239379ce3 Mon Sep 17 00:00:00 2001 From: Kevin Newton Date: Fri, 25 Aug 2023 15:48:45 -0400 Subject: [PATCH] [ruby/yarp] Fix relative require for version in YARP gemspec https://github.com/ruby/yarp/commit/ca8e8cfa0d --- lib/yarp/yarp.gemspec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/yarp/yarp.gemspec b/lib/yarp/yarp.gemspec index 671eddc7a2..b04f893d04 100644 --- a/lib/yarp/yarp.gemspec +++ b/lib/yarp/yarp.gemspec @@ -1,6 +1,12 @@ # frozen_string_literal: true -require_relative 'lib/yarp/version' +if File.exist?(File.expand_path("version.rb", __dir__)) + # CRuby + require_relative "version" +else + # Within the gem/local repository + require_relative "lib/yarp/version" +end Gem::Specification.new do |spec| spec.name = "yarp"