aboutsummaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-06-16 07:02:22 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-06-16 07:02:22 +0000
commit74c83a38ea637c19a4d33ab64fd5d3b0b169fe4e (patch)
tree06b6846cff862abde4526a2b0f997535926d96d9 /ext
parent5202fcc74c5aed2afa2b779d26f0537e11e93093 (diff)
downloadruby-74c83a38ea637c19a4d33ab64fd5d3b0b169fe4e.tar.gz
Merge psych-3.0.0.beta2 from https://github.com/ruby/psych
It contains following changes from 3.0.0.beta1 * Preserve time zone offset when deserializing times https://github.com/ruby/psych/pull/316 * Enable YAML serialization of Ruby delegators https://github.com/ruby/psych/pull/158 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/psych/lib/psych/scalar_scanner.rb2
-rw-r--r--ext/psych/lib/psych/versions.rb2
-rw-r--r--ext/psych/lib/psych/visitors/yaml_tree.rb2
-rw-r--r--ext/psych/psych.gemspec4
4 files changed, 6 insertions, 4 deletions
diff --git a/ext/psych/lib/psych/scalar_scanner.rb b/ext/psych/lib/psych/scalar_scanner.rb
index 449efa4e53..67c0cc3d4e 100644
--- a/ext/psych/lib/psych/scalar_scanner.rb
+++ b/ext/psych/lib/psych/scalar_scanner.rb
@@ -143,7 +143,7 @@ module Psych
offset += ((tz[1] || 0) * 60)
end
- klass.at((time - offset).to_i, us)
+ klass.new(yy, m, dd, hh, mm, ss+us/(1_000_000r), offset)
end
end
end
diff --git a/ext/psych/lib/psych/versions.rb b/ext/psych/lib/psych/versions.rb
index 12029f0a68..3d61c8b015 100644
--- a/ext/psych/lib/psych/versions.rb
+++ b/ext/psych/lib/psych/versions.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: false
module Psych
# The version is Psych you're using
- VERSION = '3.0.0.beta1'
+ VERSION = '3.0.0.beta2'
if RUBY_ENGINE == 'jruby'
DEFAULT_SNAKEYAML_VERSION = '1.18'.freeze
diff --git a/ext/psych/lib/psych/visitors/yaml_tree.rb b/ext/psych/lib/psych/visitors/yaml_tree.rb
index cae876c872..e197a30611 100644
--- a/ext/psych/lib/psych/visitors/yaml_tree.rb
+++ b/ext/psych/lib/psych/visitors/yaml_tree.rb
@@ -164,6 +164,8 @@ module Psych
@emitter.end_mapping
end
+ alias :visit_Delegator :visit_Object
+
def visit_Struct o
tag = ['!ruby/struct', o.class.name].compact.join(':')
diff --git a/ext/psych/psych.gemspec b/ext/psych/psych.gemspec
index 73e3c34cbf..c0ec5c5334 100644
--- a/ext/psych/psych.gemspec
+++ b/ext/psych/psych.gemspec
@@ -2,10 +2,10 @@
Gem::Specification.new do |s|
s.name = "psych"
- s.version = "3.0.0.beta1"
+ s.version = "3.0.0.beta2"
s.authors = ["Aaron Patterson", "SHIBATA Hiroshi", "Charles Oliver Nutter"]
s.email = ["aaron@tenderlovemaking.com", "hsbt@ruby-lang.org", "headius@headius.com"]
- s.date = "2016-11-14"
+ s.date = "2017-06-16"
s.summary = "Psych is a YAML parser and emitter"
s.description = <<-DESCRIPTION
Psych is a YAML parser and emitter. Psych leverages libyaml[http://pyyaml.org/wiki/LibYAML]