summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/psych/versions.rb2
-rw-r--r--psych.gemspec10
2 files changed, 5 insertions, 7 deletions
diff --git a/lib/psych/versions.rb b/lib/psych/versions.rb
index 731ba95..dfa1917 100644
--- a/lib/psych/versions.rb
+++ b/lib/psych/versions.rb
@@ -2,7 +2,7 @@
# frozen_string_literal: true
module Psych
# The version of Psych you are using
- VERSION = '3.1.0' unless defined?(::Psych::VERSION)
+ VERSION = '3.1.0'
if RUBY_ENGINE == 'jruby'
DEFAULT_SNAKEYAML_VERSION = '1.23'.freeze
diff --git a/psych.gemspec b/psych.gemspec
index 0990098..f55cd2a 100644
--- a/psych.gemspec
+++ b/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"