diff options
author | SHIBATA Hiroshi <hsbt@ruby-lang.org> | 2016-11-18 17:33:29 +0900 |
---|---|---|
committer | SHIBATA Hiroshi <hsbt@ruby-lang.org> | 2016-11-18 17:33:29 +0900 |
commit | d65f69baf448c3639ad6aab88872da0882066535 (patch) | |
tree | c2cabd9b8a06bc5722aedc94228df37f7d11683f /lib | |
parent | bb1ee3edb7b28a31c60c2670c2fd41b3c74273b0 (diff) | |
download | psych-d65f69baf448c3639ad6aab88872da0882066535.tar.gz |
Unify Psych version constants to psych/versions.rb.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/psych.rb | 4 | ||||
-rw-r--r-- | lib/psych/versions.rb | 7 | ||||
-rw-r--r-- | lib/psych_jars.rb | 1 |
3 files changed, 7 insertions, 5 deletions
diff --git a/lib/psych.rb b/lib/psych.rb index 7e5b0ed..b117b25 100644 --- a/lib/psych.rb +++ b/lib/psych.rb @@ -1,4 +1,5 @@ # frozen_string_literal: false +require 'psych/versions' case RUBY_ENGINE when 'jruby' require 'psych_jars' @@ -223,9 +224,6 @@ require 'psych/class_loader' # # => "a" module Psych - # The version is Psych you're using - VERSION = '2.2.1' - # The version of libyaml Psych is using LIBYAML_VERSION = Psych.libyaml_version.join '.' diff --git a/lib/psych/versions.rb b/lib/psych/versions.rb index 62fca91..b01fa7d 100644 --- a/lib/psych/versions.rb +++ b/lib/psych/versions.rb @@ -1,4 +1,9 @@ # frozen_string_literal: false module Psych - DEFAULT_SNAKEYAML_VERSION = '1.17'.freeze + # The version is Psych you're using + VERSION = '2.2.1' + + if RUBY_ENGINE == 'jruby' + DEFAULT_SNAKEYAML_VERSION = '1.17'.freeze + end end diff --git a/lib/psych_jars.rb b/lib/psych_jars.rb index bd7ea04..2f34e34 100644 --- a/lib/psych_jars.rb +++ b/lib/psych_jars.rb @@ -1,5 +1,4 @@ # frozen_string_literal: false -require 'psych/versions' require 'psych.jar' require 'jar-dependencies' |