ruby-changes:44008
From: hsbt <ko1@a...>
Date: Wed, 7 Sep 2016 12:16:21 +0900 (JST)
Subject: [ruby-changes:44008] hsbt:r56081 (trunk): * ext/psych/*, test/psych/*: Update psych-2.1.1
hsbt 2016-09-07 12:16:15 +0900 (Wed, 07 Sep 2016) New Revision: 56081 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=56081 Log: * ext/psych/*, test/psych/*: Update psych-2.1.1 This version fixed following pull requests. https://github.com/tenderlove/psych/pull/284 https://github.com/tenderlove/psych/pull/276 Modified files: trunk/ChangeLog trunk/ext/psych/lib/psych/scalar_scanner.rb trunk/ext/psych/lib/psych/visitors/to_ruby.rb trunk/ext/psych/lib/psych.rb trunk/ext/psych/psych.gemspec trunk/test/psych/test_scalar_scanner.rb trunk/test/psych/test_string.rb Index: test/psych/test_string.rb =================================================================== --- test/psych/test_string.rb (revision 56080) +++ test/psych/test_string.rb (revision 56081) @@ -99,6 +99,10 @@ module Psych https://github.com/ruby/ruby/blob/trunk/test/psych/test_string.rb#L99 assert_cycle '+.' end + def test_float_with_no_fractional_before_exponent + assert_cycle '0.E+0' + end + def test_string_subclass_with_anchor y = Psych.load <<-eoyml --- Index: test/psych/test_scalar_scanner.rb =================================================================== --- test/psych/test_scalar_scanner.rb (revision 56080) +++ test/psych/test_scalar_scanner.rb (revision 56081) @@ -74,6 +74,10 @@ module Psych https://github.com/ruby/ruby/blob/trunk/test/psych/test_scalar_scanner.rb#L74 assert ss.tokenize('.nan').nan? end + def test_scan_float_with_exponent_but_no_fraction + assert_equal(0.0, ss.tokenize('0.E+0')) + end + def test_scan_null assert_equal nil, ss.tokenize('null') assert_equal nil, ss.tokenize('~') Index: ext/psych/lib/psych/scalar_scanner.rb =================================================================== --- ext/psych/lib/psych/scalar_scanner.rb (revision 56080) +++ ext/psych/lib/psych/scalar_scanner.rb (revision 56081) @@ -100,7 +100,7 @@ module Psych https://github.com/ruby/ruby/blob/trunk/ext/psych/lib/psych/scalar_scanner.rb#L100 @string_cache[string] = true string else - Float(string.gsub(/[,_]|\.$/, '')) + Float(string.gsub(/[,_]|\.([Ee]|$)/, '\1')) end else int = parse_int string.gsub(/[,_]/, '') Index: ext/psych/lib/psych/visitors/to_ruby.rb =================================================================== --- ext/psych/lib/psych/visitors/to_ruby.rb (revision 56080) +++ ext/psych/lib/psych/visitors/to_ruby.rb (revision 56081) @@ -70,11 +70,11 @@ module Psych https://github.com/ruby/ruby/blob/trunk/ext/psych/lib/psych/visitors/to_ruby.rb#L70 o.value end when '!ruby/object:BigDecimal' - require 'bigdecimal' + require 'bigdecimal' unless defined? BigDecimal class_loader.big_decimal._load o.value when "!ruby/object:DateTime" class_loader.date_time - require 'date' + require 'date' unless defined? DateTime @ss.parse_time(o.value).to_datetime when '!ruby/encoding' ::Encoding.find o.value Index: ext/psych/lib/psych.rb =================================================================== --- ext/psych/lib/psych.rb (revision 56080) +++ ext/psych/lib/psych.rb (revision 56081) @@ -224,7 +224,7 @@ require 'psych/class_loader' https://github.com/ruby/ruby/blob/trunk/ext/psych/lib/psych.rb#L224 module Psych # The version is Psych you're using - VERSION = '2.1.0' + VERSION = '2.1.1' # The version of libyaml Psych is using LIBYAML_VERSION = Psych.libyaml_version.join '.' Index: ext/psych/psych.gemspec =================================================================== --- ext/psych/psych.gemspec (revision 56080) +++ ext/psych/psych.gemspec (revision 56081) @@ -1,45 +1,39 @@ https://github.com/ruby/ruby/blob/trunk/ext/psych/psych.gemspec#L1 # -*- encoding: utf-8 -*- -# stub: psych 2.1.0 ruby lib -# stub: ext/psych/extconf.rb Gem::Specification.new do |s| s.name = "psych" - s.version = "2.1.0" - - s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= - s.require_paths = ["lib"] - s.authors = ["Aaron Patterson"] - s.date = "2016-06-24" - s.description = "Psych is a YAML parser and emitter. Psych leverages libyaml[http://pyyaml.org/wiki/LibYAML]\nfor its YAML parsing and emitting capabilities. In addition to wrapping\nlibyaml, Psych also knows how to serialize and de-serialize most Ruby objects\nto and from the YAML format." - s.email = ["aaron@t..."] - s.extensions = ["ext/psych/extconf.rb"] - s.extra_rdoc_files = ["CHANGELOG.rdoc", "Manifest.txt", "README.rdoc", "CHANGELOG.rdoc", "README.rdoc"] - s.files = [".autotest", ".travis.yml", "CHANGELOG.rdoc", "Manifest.txt", "README.rdoc", "Rakefile", "ext/psych/depend", "ext/psych/extconf.rb", "ext/psych/psych.c", "ext/psych/psych.h", "ext/psych/psych_emitter.c", "ext/psych/psych_emitter.h", "ext/psych/psych_parser.c", "ext/psych/psych_parser.h", "ext/psych/psych_to_ruby.c", "ext/psych/psych_to_ruby.h", "ext/psych/psych_yaml_tree.c", "ext/psych/psych_yaml_tree.h", "ext/psych/yaml/LICENSE", "ext/psych/yaml/api.c", "ext/psych/yaml/config.h", "ext/psych/yaml/dumper.c", "ext/psych/yaml/emitter.c", "ext/psych/yaml/loader.c", "ext/psych/yaml/parser.c", "ext/psych/yaml/reader.c", "ext/psych/yaml/scanner.c", "ext/psych/yaml/writer.c", "ext/psych/yaml/yaml.h", "ext/psych/yaml/yaml_private.h", "lib/psych.rb", "lib/psych/class_loader.rb", "lib/psych/coder.rb", "lib/psych/core_ext.rb", "lib/psych/deprecated.rb", "lib/psych/exception.rb", "lib/psych/handler.rb", "lib/psych/handlers/document_stream.rb", "lib/psych/handlers/recorder.rb ", "lib/psych/json/ruby_events.rb", "lib/psych/json/stream.rb", "lib/psych/json/tree_builder.rb", "lib/psych/json/yaml_events.rb", "lib/psych/nodes.rb", "lib/psych/nodes/alias.rb", "lib/psych/nodes/document.rb", "lib/psych/nodes/mapping.rb", "lib/psych/nodes/node.rb", "lib/psych/nodes/scalar.rb", "lib/psych/nodes/sequence.rb", "lib/psych/nodes/stream.rb", "lib/psych/omap.rb", "lib/psych/parser.rb", "lib/psych/scalar_scanner.rb", "lib/psych/set.rb", "lib/psych/stream.rb", "lib/psych/streaming.rb", "lib/psych/syntax_error.rb", "lib/psych/tree_builder.rb", "lib/psych/versions.rb", "lib/psych/visitors.rb", "lib/psych/visitors/depth_first.rb", "lib/psych/visitors/emitter.rb", "lib/psych/visitors/json_tree.rb", "lib/psych/visitors/to_ruby.rb", "lib/psych/visitors/visitor.rb", "lib/psych/visitors/yaml_tree.rb", "lib/psych/y.rb", "lib/psych_jars.rb", "test/psych/handlers/test_recorder.rb", "test/psych/helper.rb", "test/psych/json/test_stream.rb", "test/psych/nodes/test_enumerable.rb ", "test/psych/test_alias_and_anchor.rb", "test/psych/test_array.rb", "test/psych/test_boolean.rb", "test/psych/test_class.rb", "test/psych/test_coder.rb", "test/psych/test_date_time.rb", "test/psych/test_deprecated.rb", "test/psych/test_document.rb", "test/psych/test_emitter.rb", "test/psych/test_encoding.rb", "test/psych/test_exception.rb", "test/psych/test_hash.rb", "test/psych/test_json_tree.rb", "test/psych/test_merge_keys.rb", "test/psych/test_nil.rb", "test/psych/test_null.rb", "test/psych/test_numeric.rb", "test/psych/test_object.rb", "test/psych/test_object_references.rb", "test/psych/test_omap.rb", "test/psych/test_parser.rb", "test/psych/test_psych.rb", "test/psych/test_safe_load.rb", "test/psych/test_scalar.rb", "test/psych/test_scalar_scanner.rb", "test/psych/test_serialize_subclasses.rb", "test/psych/test_set.rb", "test/psych/test_stream.rb", "test/psych/test_string.rb", "test/psych/test_struct.rb", "test/psych/test_symbol.rb", "test/psych/test_tainted.rb", "te st/psych/test_to_yaml_properties.rb", "test/psych/test_tree_builder.rb", "test/psych/test_yaml.rb", "test/psych/test_yamldbm.rb", "test/psych/test_yamlstore.rb", "test/psych/visitors/test_depth_first.rb", "test/psych/visitors/test_emitter.rb", "test/psych/visitors/test_to_ruby.rb", "test/psych/visitors/test_yaml_tree.rb"] + s.version = "2.1.1" + s.authors = ["Aaron Patterson", "SHIBATA Hiroshi"] + s.email = ["aaron@t...", "hsbt@r..."] + s.date = "2016-09-07" + 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] +for its YAML parsing and emitting capabilities. In addition to wrapping libyaml, +Psych also knows how to serialize and de-serialize most Ruby objects to and from the YAML format. +DESCRIPTION s.homepage = "http://github.com/tenderlove/psych" s.licenses = ["MIT"] + s.require_paths = ["lib"] + s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } + s.rdoc_options = ["--main", "README.rdoc"] + s.extra_rdoc_files = ["CHANGELOG.rdoc", "README.rdoc", "CHANGELOG.rdoc", "README.rdoc"] + s.required_ruby_version = Gem::Requirement.new(">= 1.9.2") s.rubygems_version = "2.5.1" - s.summary = "Psych is a YAML parser and emitter" + s.required_rubygems_version = Gem::Requirement.new(">= 0") - if s.respond_to? :specification_version then - s.specification_version = 4 + s.add_development_dependency(%q<rake-compiler>, [">= 0.4.1"]) + s.add_development_dependency(%q<minitest>, ["~> 5.0"]) - if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then - s.add_development_dependency(%q<rdoc>, ["~> 4.0"]) - s.add_development_dependency(%q<rake-compiler>, [">= 0.4.1"]) - s.add_development_dependency(%q<minitest>, ["~> 5.0"]) - s.add_development_dependency(%q<hoe>, ["~> 3.15"]) - else - s.add_dependency(%q<rdoc>, ["~> 4.0"]) - s.add_dependency(%q<rake-compiler>, [">= 0.4.1"]) - s.add_dependency(%q<minitest>, ["~> 5.0"]) - s.add_dependency(%q<hoe>, ["~> 3.15"]) - end + if RUBY_PLATFORM =~ /java/ + require 'psych/versions' + s.platform = 'java' + s.requirements = "jar org.yaml:snakeyaml, #{Psych::DEFAULT_SNAKEYAML_VERSION}" + s.add_dependency 'jar-dependencies', '>= 0.1.7' + s.add_development_dependency 'ruby-maven' else - s.add_dependency(%q<rdoc>, ["~> 4.0"]) - s.add_dependency(%q<rake-compiler>, [">= 0.4.1"]) - s.add_dependency(%q<minitest>, ["~> 5.0"]) - s.add_dependency(%q<hoe>, ["~> 3.15"]) + s.extensions = ["ext/psych/extconf.rb"] end end Index: ChangeLog =================================================================== --- ChangeLog (revision 56080) +++ ChangeLog (revision 56081) @@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Wed Sep 7 12:16:09 2016 SHIBATA Hiroshi <hsbt@r...> + + * ext/psych/*, test/psych/*: Update psych-2.1.1 + This version fixed following pull requests. + https://github.com/tenderlove/psych/pull/284 + https://github.com/tenderlove/psych/pull/276 + Wed Sep 7 11:51:06 2016 SHIBATA Hiroshi <hsbt@r...> * lib/rdoc/*, test/rdoc/*: Update rdoc-5.0.0.beta1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/