summaryrefslogtreecommitdiff
path: root/test/psych/visitors
AgeCommit message (Collapse)Author
2023-12-19[ruby/psych] Use `assert_same` in tests where applicableAlexander Momchilov
https://github.com/ruby/psych/commit/0dc25a9d6a
2023-06-12[ruby/psych] Prefer `assert_include` for simple stringsNobuyoshi Nakada
https://github.com/ruby/psych/commit/33024ce2b0
2021-07-29[ruby/psych] require 'delegate' explicitlyPavel Rosický
https://github.com/ruby/psych/commit/51a9ce13db
2021-05-17[ruby/psych] Introduce `Psych.unsafe_load`Aaron Patterson
In future versions of Psych, the `load` method will be mostly the same as the `safe_load` method. In other words, the `load` method won't allow arbitrary object deserialization (which can be used to escalate to an RCE). People that need to load *trusted* documents can use the `unsafe_load` method. This commit introduces the `unsafe_load` method so that people can incrementally upgrade. For example, if they try to upgrade to 4.0.0 and something breaks, they can downgrade, audit callsites, change to `safe_load` or `unsafe_load` as required, and then upgrade to 4.0.0 smoothly. https://github.com/ruby/psych/commit/cb50aa8d3f
2021-05-10[ruby/psych] Use assert_raise instead of assert_raisesHiroshi SHIBATA
https://github.com/ruby/psych/commit/e6ad12b4e1
2020-02-13Fix remove warning & support multi-run test for ↵S-H-GAMELINKS
test/psych/visitors/test_to_ruby.rb Notes: Merged: https://github.com/ruby/ruby/pull/2893
2020-02-07remove warning & support multi-run test for ↵S.H
test/psych/visitors/test_to_ruby.rb (#2881) Notes: Merged-By: nurse <naruse@airemix.jp>
2019-07-25[ruby/psych] Suppress uninitialized instance variable warningsNobuyoshi Nakada
In verbose mode, `test_delegator` in `test/psych/visitors/test_yaml_tree.rb` shows following warning. https://travis-ci.org/ruby/psych/jobs/562435717#L268 ``` /home/travis/build/ruby/psych/test/psych/visitors/test_yaml_tree.rb:10: warning: instance variable @obj not initialized ``` This is because `Psych.load` bypasses #initialize with the #init_with method. https://github.com/ruby/psych/commit/f99523388f
2017-07-14Merge psych-3.0.0.beta3 from ruby/psych.hsbt
* Rely on encoding tags to determine if string should be dumped as binary. https://github.com/ruby/psych/commit/8949a47b8cee31e03e21608406ba116adcf74054 * Specify "frozen_string_literal: true". * Support to binary release for mingw32 platform. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-16Merge psych-3.0.0.beta2 from https://github.com/ruby/psychhsbt
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
2017-04-05Import psych-3.0.0.beta1 from ruby/psych.hsbt
* Removed deprecated code. * Removed code related syck gem. * Fixed typos. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-24* ext/psych/*, test/psych/*: Upate psych 2.1.0hsbt
This version fixed [Bug #11988][ruby-core:72850] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16Add frozen_string_literal: false for all filesnaruse
When you change this to true, you may need to add more tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-07* ext/psych/*: update psych to 2.0.16tenderlove
* test/psych/*: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-21* ext/psych/*: update to Psych 2.0.14tenderlove
* test/psych/*: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-14* ext/psych/lib/psych.rb: Adding Psych.safe_load for loading a usertenderlove
defined, restricted subset of Ruby object types. * ext/psych/lib/psych/class_loader.rb: A class loader for encapsulating the logic for which objects are allowed to be deserialized. * ext/psych/lib/psych/deprecated.rb: Changes to use the class loader * ext/psych/lib/psych/exception.rb: ditto * ext/psych/lib/psych/json/stream.rb: ditto * ext/psych/lib/psych/nodes/node.rb: ditto * ext/psych/lib/psych/scalar_scanner.rb: ditto * ext/psych/lib/psych/stream.rb: ditto * ext/psych/lib/psych/streaming.rb: ditto * ext/psych/lib/psych/visitors/json_tree.rb: ditto * ext/psych/lib/psych/visitors/to_ruby.rb: ditto * ext/psych/lib/psych/visitors/yaml_tree.rb: ditto * ext/psych/psych_to_ruby.c: ditto * test/psych/helper.rb: ditto * test/psych/test_safe_load.rb: tests for restricted subset. * test/psych/test_scalar_scanner.rb: ditto * test/psych/visitors/test_to_ruby.rb: ditto * test/psych/visitors/test_yaml_tree.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-05change test name to be more helpfultenderlove
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-06* ruby.c (load_file_internal): set default source encoding asnaruse
UTF-8 instead of US-ASCII. [ruby-core:46021] [Feature #6679] * parse.y (parser_initialize): set default parser encoding as UTF-8 instead of US-ASCII. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-28* ext/psych/lib/psych/visitors/yaml_tree.rb: `tree` should return thetenderlove
same thing on every call. * test/psych/visitors/test_yaml_tree.rb: related test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37350 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-28* ext/psych/lib/psych/visitors/yaml_tree.rb: YAML Tree object shouldtenderlove
be able to take an emitter object as it's output. * test/psych/visitors/test_yaml_tree.rb: related test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-03* ext/psych/lib/psych.rb: calling `yaml` rather than `to_yaml`.tenderlove
* ext/psych/lib/psych/nodes/node.rb: Rename `to_yaml` to just `yaml` in order to avoid YAML::ENGINE switching from replacing this method. * test/psych/helper.rb: fix tests for method name change. * test/psych/test_document.rb: ditto * test/psych/visitors/test_emitter.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-30converting require_relative to just regular requirestenderlove
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-09* ext/psych/lib/psych/visitors/yaml_tree.rb: Rescue exceptions whentenderlove
people implement the method method. Thanks Lin Jen-Shin. [ruby-core:35255] * test/psych/visitors/test_yaml_tree.rb: test for implementation of method method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-21* ext/psych/lib/psych/nodes/node.rb: Make Psych::Nodes::Nodetenderlove
enumerable. * ext/psych/lib/psych/visitors/depth_first.rb: Add a depth-first visitor to enumerate over a YAML AST in a depth-first fashion * test/psych/nodes/test_enumerable.rb: test for enumerating nodes * test/psych/visitors/test_depth_first.rb: test for depth-first visitor git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30624 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-07* ext/psych/lib/psych/visitors/emitter.rb: sending emit options totenderlove
YAML emitter. [ruby-core:28318] * ext/psych/emitter.c: updating documentation about emit options * ext/psych/lib/psych/core_ext.rb: ditto * ext/psych/lib/psych.rb (dump): passing emit options to emitter. * ext/psych/lib/psych/nodes/node.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-06* ext/psych/lib/psych/scalar_scanner.rb (parse_time): dealing withtenderlove
negative partial hour time zones. [ruby-core:31064] * ext/psych/lib/psych/visitors/yaml_tree.rb: ditto * test/psych/visitors/test_to_ruby.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-06* test/psych/visitors/test_to_ruby.rb (test_time): time test musttenderlove
respect non-whole timezone. Thanks akr! [ruby-core:31061] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-05* ext/psych/lib/psych/visitors/yaml_tree.rb (format_time): nanosecondstenderlove
require more digits when dumping. Thanks akr! [ruby-core:31047] * test/psych/visitors/test_to_ruby.rb: adjusting tests for nanoseconds git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-03* ext/psych/lib/psych/visitors/yaml_tree.rb (visit_Time): usetenderlove
Time#nsec to accurately serialize time objects. [ruby-core:29233] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-28* test/psych/visitors/test_yaml_tree.rb (test_struct_const): removemame
Struct::Foo which affects test/ruby/test_struct to warn redefining constant. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-17* ext/psych/lib/psych/visitors/yaml_tree.rb: defaulting binary stringtenderlove
format to "literal" format. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-29* test/psych/*: switching tests to use relative require.tenderlove
[ruby-core:29104] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-29* test/psych/visitors/test_to_ruby.rb: switching to assert_in_deltatenderlove
* test/psych/visitors/test_yaml_tree.rb: switching to assert_in_delta git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-28* ext/psych/*: importing Psych to trunktenderlove
* test/psych/*: ditto * lib/psych/*: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e