diff options
| author | Kevin Newton <kddnewton@gmail.com> | 2023-08-25 15:48:45 -0400 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2023-08-25 19:48:51 +0000 |
| commit | 934552618e8b8a71b3910fdb35ee65f239379ce3 (patch) | |
| tree | ca3b6123e8bc143a0dc5ed8d5eab3306854b526e | |
| parent | a7c7cd11bc5c33173f3eeab8600819f84fe2d662 (diff) | |
[ruby/yarp] Fix relative require for version in YARP gemspec
https://github.com/ruby/yarp/commit/ca8e8cfa0d
| -rw-r--r-- | lib/yarp/yarp.gemspec | 8 |
1 files changed, 7 insertions, 1 deletions
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" |
