summaryrefslogtreecommitdiff
path: root/ext/psych/lib
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2020-02-14 00:26:37 +0100
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-06-05 11:49:56 +0900
commitcd3d035e8a0d8555748f564f10ea00458a60355c (patch)
tree7dcb9248ef563a092be5c7c16f7abcc4dabed9f3 /ext/psych/lib
parentf2459763862fa2eef6929557a87763fe5ff5c470 (diff)
[ruby/psych] Remove unnecessary version guard from versions.rb
Removing it triggers the following warnings when running `bundle` under jruby from the root of the `psych` repo prints the following warnings: ``` /path/to/jruby-9.2.9.0/lib/ruby/gems/shared/gems/psych-3.1.0-java/lib/psych/versions.rb:7: warning: already initialized constant VERSION /path/to//jruby-9.2.9.0/lib/ruby/gems/shared/gems/psych-3.1.0-java/lib/psych/versions.rb:10: warning: already initialized constant DEFAULT_SNAKEYAML_VERSION ``` This is because bundler loads the versions file relatively from the local gemspec, and then internally loads the psych gem, causing the redefinition warnings. Instead, we modify the $LOAD_PATH so that when working locally on the `psych` repo, the local version of `psych` gets used. https://github.com/ruby/psych/commit/a3fc8191a7
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3188
Diffstat (limited to 'ext/psych/lib')
-rw-r--r--ext/psych/lib/psych/versions.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/psych/lib/psych/versions.rb b/ext/psych/lib/psych/versions.rb
index 731ba9545e..dfa1917a65 100644
--- a/ext/psych/lib/psych/versions.rb
+++ b/ext/psych/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