summaryrefslogtreecommitdiff
path: root/test/psych/test_psych.rb
Commit message (Collapse)AuthorAgeFilesLines
* [ruby/psych] Fix RestrictedYAMLTree allowing the Symbol class should allow ↵Jean Boussier2023-01-231-2/+5
| | | | | | | | | | | | | | | | all symbols Ref: https://github.com/ruby/psych/pull/495 That's how it works for `safe_load`: ```ruby >> YAML.safe_load(':foo', permitted_classes: [Symbol]) => :foo ``` So `safe_dump` should mirror that. https://github.com/ruby/psych/commit/592a75a656
* [ruby/psych] Fix the test that does not work with libyaml-0.1.7Yusuke Endoh2021-06-081-1/+1
| | | | https://github.com/ruby/psych/commit/542cf9754f
* Do not use YAML module in tests of PsychHiroshi SHIBATA2021-06-071-8/+8
|
* Use assert_raise instead of assert_raisesHiroshi SHIBATA2021-06-071-4/+4
|
* [ruby/psych] Implement YAML.safe_dump to make safe_load more usable.Jean Boussier2021-06-071-0/+57
| | | | | | | | | | | In case where Psych is used as a two way serializers, e.g. to serialize some cache or config, it is preferable to have the same restrictions on both load and dump. Otherwise you might dump and persist some objects payloads that you later won't be able to read. https://github.com/ruby/psych/commit/441958396f
* [ruby/psych] remove deprecated interfaceAaron Patterson2021-05-171-6/+2
| | | | https://github.com/ruby/psych/commit/0767227051
* [ruby/psych] Introduce `Psych.unsafe_load`Aaron Patterson2021-05-171-11/+11
| | | | | | | | | | | | | | | | 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
* [ruby/psych] Fix symabolize_name with non-string keysJean Boussier2021-05-171-3/+4
| | | | https://github.com/ruby/psych/commit/1c5c29e81f
* [ruby/psych] Use assert_raise instead of assert_raisesHiroshi SHIBATA2021-05-101-7/+7
| | | | https://github.com/ruby/psych/commit/e6ad12b4e1
* [ruby/psych] Use pend instead of skipHiroshi SHIBATA2021-05-101-1/+1
| | | | https://github.com/ruby/psych/commit/efd2a62c9a
* Merge Psych-3.2.1 from ruby/psychHiroshi SHIBATA2020-12-141-0/+12
|
* [ruby/psych] Forward keyword arguments in load_file and load_streamJean Boussier2020-09-251-0/+34
| | | | https://github.com/ruby/psych/commit/4e1dd37f09
* [ruby/psych] Fixing compatibility with libyaml 0.2.5Aaron Patterson2020-06-051-10/+7
| | | | | | | | | The main issue is that commas aren't allowed in local tags. libyaml was updated to follow the spec, and our tests were out of date. See: https://github.com/yaml/libyaml/issues/196 https://github.com/ruby/psych/commit/3f5e520fd3
* [ruby/psych] Implement `freeze` option for Pysch.loadJean Boussier2020-06-051-0/+16
| | | | https://github.com/ruby/psych/commit/7dae24894d
* Merge Pysch-3.1.0.pre2 from ruby/psych.hsbt2018-10-201-0/+6
| | | | | | * Added deprecated warnings for the new interface of keyword argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Merge psych-3.1.0.pre1.hsbt2018-08-271-2/+84
| | | | | | | | | * Update bundled libyaml-0.2.1 from 0.1.7. https://github.com/ruby/psych/pull/368 * Unify Psych's API: To use keyword arguments with method call. https://github.com/ruby/psych/pull/358 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Merge Pysch 3.0.3.pre1.hsbt2018-04-281-0/+37
| | | | | | | | | I added the following additional commits from 3.0.3.pre1: * https://github.com/ruby/psych/pull/356 * https://github.com/ruby/psych/pull/357 * https://github.com/ruby/psych/pull/359 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Merge psych-3.0.2 from ruby/psych.hsbt2017-12-191-1/+1
| | | | | | | | | | | It version changed fallback option to keywoad argument on `Yaml.load` method. It break backword compatiblity. see detailed discuttion: https://github.com/ruby/psych/issues/340 From: SHIBATA Hiroshi <hsbt@ruby-lang.org> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Merge psych-3.0.0.hsbt2017-12-011-7/+7
| | | | | | See NEWS file for this update details. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Merge psych-3.0.0.beta4 from upstream.hsbt2017-11-271-0/+18
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Merge psych-3.0.0.beta3 from ruby/psych.hsbt2017-07-141-2/+2
| | | | | | | | | * 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
* Import psych-3.0.0.beta1 from ruby/psych.hsbt2017-04-051-2/+2
| | | | | | | | * 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
* test_psych.rb: close Tempfilenobu2016-08-231-2/+3
| | | | | | | * test/psych/test_psych.rb (test_load_file_with_fallback): fix Tempfile leak. https://github.com/tenderlove/psych/pull/288 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/*, test/psych/*: Upate psych 2.1.0hsbt2016-06-241-0/+5
| | | | | | 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
* Add frozen_string_literal: false for all filesnaruse2015-12-161-0/+1
| | | | | | 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
* * ext/psych/*: update psych to 2.0.16tenderlove2015-12-071-1/+11
| | | | | | * test/psych/*: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/csv/test_features.rb, test/logger/test_logger.rbakr2013-04-201-14/+13
| | | | | | | | | | | | | | | | | | test/mkmf/test_have_macro.rb, test/net/http/test_http.rb, test/openssl/test_config.rb, test/psych/test_encoding.rb, test/psych/test_exception.rb, test/psych/test_psych.rb, test/psych/test_tainted.rb, test/readline/test_readline.rb, test/rexml/test_contrib.rb, test/ruby/test_autoload.rb, test/ruby/test_beginendblock.rb, test/ruby/test_exception.rb, test/ruby/test_file.rb, test/ruby/test_io.rb, test/ruby/test_marshal.rb, test/ruby/test_process.rb, test/ruby/test_require.rb, test/ruby/test_rubyoptions.rb, test/syslog/test_syslog_logger.rb, test/webrick/test_httpauth.rb, test/zlib/test_zlib.rb: Use Tempfile.create. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/psych/test_*.rb: use require_relative to require local libraryxibbar2013-03-261-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_require.rb: Remove temporally files in the tests.akr2013-03-241-0/+1
| | | | | | | | | | | | | | | | | | | | * test/ruby/test_rubyoptions.rb: Ditto. * test/logger/test_logger.rb: Ditto. * test/psych/test_psych.rb: Ditto. * test/readline/test_readline.rb: Ditto. * test/syslog/test_syslog_logger.rb: Ditto. * test/webrick/test_httpauth.rb: Ditto. * test/zlib/test_zlib.rb: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych/visitors/yaml_tree.rb: fixing string quotationtenderlove2013-02-071-1/+1
| | | | | | | | | | when dumping Ruby strings. Thanks Ingy * test/psych/test_psych.rb: appropriate tests. * test/psych/test_yaml.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fixing syntax error in 1.8tenderlove2011-03-301-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* converting require_relative to just regular requirestenderlove2011-03-301-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych/visitors/emitter.rb (initialize): line_width istenderlove2010-07-081-0/+5
| | | | | | | a valid option passed to the emitter. * test/psych/test_psych.rb: corresponding tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych/visitors/yaml_tree.rb (push): adding versiontenderlove2010-07-071-0/+20
| | | | | | | and header emit options. * test/psych/test_psych.rb: corresponding test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych/visitors/emitter.rb: sending emit options totenderlove2010-07-071-0/+10
| | | | | | | | | | 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
* * ext/psych/lib/psych/visitors/to_ruby.rb (resolve_klass): fix thetenderlove2010-06-181-0/+7
| | | | | | | | | exception message when attempting to load an unknown class. Thanks nobu! [ruby-dev:41399] * test/psych/test_psych.rb: test for the exception message git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/psych/test_psych.rb: don't leave temporary files.akr2010-04-241-8/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych.rb: supporting deprecated syck methodtenderlove2010-04-241-1/+22
| | | | | | | | | add_ruby_type * ext/psych/lib/psych/visitors/to_ruby.rb: ditto * test/psych/test_deprecated.rb: ditto * test/psych/test_psych.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/parser.c: parse raises a TypeError when nil is passed in.tenderlove2010-04-091-0/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych.rb: Syck api compatibility [ruby-core:29157]tenderlove2010-03-311-0/+19
| | | | | | | * ext/psych/lib/psych/nodes/node.rb: ditto * test/psych/test_psych.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/psych.rb: Fix problem with empty and white-space only strings.tenderlove2010-03-291-0/+7
| | | | | | | Thanks Peter McLain! * test/psych/test_psych.rb: tests for change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/psych/*: switching tests to use relative require.tenderlove2010-03-291-1/+1
| | | | | | [ruby-core:29104] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/*: importing Psych to trunktenderlove2010-03-281-0/+69
* test/psych/*: ditto * lib/psych/*: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e