summaryrefslogtreecommitdiff
path: root/ext/psych/psych.gemspec
diff options
context:
space:
mode:
Diffstat (limited to 'ext/psych/psych.gemspec')
-rw-r--r--ext/psych/psych.gemspec10
1 files changed, 4 insertions, 6 deletions
diff --git a/ext/psych/psych.gemspec b/ext/psych/psych.gemspec
index 0990098d3ec..f55cd2a85ab 100644
--- a/ext/psych/psych.gemspec
+++ b/ext/psych/psych.gemspec
@@ -1,12 +1,10 @@
# -*- encoding: utf-8 -*-
# frozen_string_literal: true
-begin
- require_relative 'lib/psych/versions'
-rescue LoadError
- # for Ruby core repository
- require_relative 'versions'
-end
+lib_path = File.expand_path('lib', __dir__)
+$LOAD_PATH.unshift lib_path if File.exist?(lib_path)
+
+require 'psych/versions'
Gem::Specification.new do |s|
s.name = "psych"