aboutsummaryrefslogtreecommitdiffstats
path: root/test/psych
Commit message (Collapse)AuthorAgeFilesLines
* [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
* Suppress debug messageNobuyoshi Nakada2021-05-261-0/+1
|
* test/psych/test_coder.rb: Suppress non-parenthesis warningsYusuke Endoh2021-05-181-3/+3
| | | | | | | http://rubyci.s3.amazonaws.com/debian9/ruby-master/log/20210518T093002Z.log.html.gz ``` /home/chkbuild/chkbuild/tmp/build/20210518T093002Z/ruby/test/psych/test_coder.rb:277: warning: ambiguity between regexp and two divisions: wrap regexp in parentheses or add a space after `/' operator ```
* Make the test pass with the old libyamlYusuke Endoh2021-05-171-3/+3
| | | | | I have no idea what result is right, but it fails with libyaml 0.1.7 (bundled with Ubuntu 18.04) anyway.
* assert_equal accepts an expected value as the first argumentYusuke Endoh2021-05-171-15/+15
|
* [ruby/psych] remove deprecated interfaceAaron Patterson2021-05-173-68/+2
| | | | https://github.com/ruby/psych/commit/0767227051
* [ruby/psych] Introduce `Psych.unsafe_load`Aaron Patterson2021-05-1724-118/+149
| | | | | | | | | | | | | | | | 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] feat: allow scalars and sequences to be styled when dumpedJeremy Ebler2021-05-171-0/+121
| | | | https://github.com/ruby/psych/commit/546154ddb7
* [ruby/psych] Fix custom marshalization with symbolize_names: trueJean Boussier2021-05-101-0/+8
| | | | https://github.com/ruby/psych/commit/ee26f26ab5
* [ruby/psych] Use assert_raise instead of assert_raisesHiroshi SHIBATA2021-05-1012-61/+61
| | | | https://github.com/ruby/psych/commit/e6ad12b4e1
* [ruby/psych] Use pend instead of skipHiroshi SHIBATA2021-05-102-2/+2
| | | | https://github.com/ruby/psych/commit/efd2a62c9a
* [ruby/psych] Fixed test-case for NaNHiroshi SHIBATA2021-05-101-2/+2
| | | | https://github.com/ruby/psych/commit/f85a008263
* [ruby/psych] Use Ractor constant for ignoreing conditionHiroshi SHIBATA2021-05-101-1/+1
| | | | https://github.com/ruby/psych/commit/cc5f957327
* [ruby/psych] Use test-unit instead of minitestHiroshi SHIBATA2021-05-101-8/+2
| | | | https://github.com/ruby/psych/commit/01e7310dd3
* [ruby/psych] Skip test_ractor.rb with ruby/psych repoHiroshi SHIBATA2020-12-231-1/+1
| | | | | | | Because ruby/psych still uses minitest. minitest didn't support assert_ractor provided by test suite of ruby/ruby repo. https://github.com/ruby/psych/commit/7da26358f1
* [ruby/psych] Optimize cache with `compare_by_identity`Marc-Andre Lafortune2020-12-231-0/+3
| | | | | Using `compare_by_identity` gives a 4x performance boost on cache hits. Benchmark in https://github.com/JuanitoFatas/fast-ruby/issues/189
* [ruby/psych] Make Ractor-ready.Marc-Andre Lafortune2020-12-231-0/+47
| | | | | | | Config is Ractor-local. Benchmarking reveals that using `Ractor.local_storage` for storing cache is similar to accessing a constant (~15% slower).
* Merge Psych-3.2.1 from ruby/psychHiroshi SHIBATA2020-12-142-0/+24
|
* [ruby/psych] Forward keyword arguments in load_file and load_streamJean Boussier2020-09-251-0/+34
| | | | https://github.com/ruby/psych/commit/4e1dd37f09
* Remove private_iv_getCharles Oliver Nutter2020-09-251-1/+2
| | | | | | | | | | | | | | | | | | | | | The only remaining use of this function was to get the internal message object from an exception's hidden `mesg` instance variable to allow it to be dumped wiithout converting to a string. As discussed in #103, this exposes internal implementation details of CRuby, and ultimately does not provide any real utility to the user since they can't directly inspect this hidden variable. The test change here is to reflect CRuby behavior that denies equality if the internal message objects do not match, as is the case after the exception has been loaded and now has a simple String value. The impact to users is that exceptions with special hidden message objects will convert those objects to String during marshaling through YAML. I believe this only affects NameError and its descendants, since users can't set this field directly on their own exception types. Fixes #103.
* [ruby/psych] Fix anchor lookup with symbolized namesJean Boussier2020-06-231-0/+10
| | | | https://github.com/ruby/psych/commit/ef74fc01e2
* [ruby/psych] Fixing compatibility with libyaml 0.2.5Aaron Patterson2020-06-053-24/+21
| | | | | | | | | 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] Fix ArgumentError with leading and trailing underscores in ↵Mark Thorn2020-06-051-0/+3
| | | | | | number strings. https://github.com/ruby/psych/commit/ac2d2c9b1b
* [ruby/psych] Implement `freeze` option for Pysch.loadJean Boussier2020-06-051-0/+16
| | | | https://github.com/ruby/psych/commit/7dae24894d
* Fix remove warning & support multi-run test for ↵S-H-GAMELINKS2020-02-131-1/+1
| | | | test/psych/visitors/test_to_ruby.rb
* remove warning & support multi-run test for test/psych_test_yaml.rb (#2887)S.H2020-02-071-0/+1
|
* remove warning & support multi-run test for ↵S.H2020-02-071-0/+1
| | | | test/psych/visitors/test_to_ruby.rb (#2881)
* [ruby/psych] Remove taint supportJeremy Evans2019-11-121-131/+0
| | | | | | | | | | | | Ruby 2.7 deprecates taint and it no longer has an effect. The lack of taint support should not cause a problem in previous Ruby versions. I'm not sure if the untaint calls in deduplicate are still needed after the removal of tainting in the parser. If they are not needed, they should be removed. https://github.com/ruby/psych/commit/73c1a2b4e0
* [ruby/psych] Suppress uninitialized instance variable warningsNobuyoshi Nakada2019-07-251-1/+1
| | | | | | | | | | | | | 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
* [ruby/psych] Deduplicate hash keys if they're stringsJean Boussier2019-07-251-0/+14
| | | | https://github.com/ruby/psych/commit/0414982ffd
* Do not allocate a string to check if a scalar is an integerJean Boussier2019-06-251-0/+17
|
* Add test to demonstrate issue deserializing hash with ivarJordan Owens2019-06-251-0/+20
| | | | | | Currently the elements of a hash are revived before any ivar values. This causes an issue when the `[]=` method references an instance variable.
* Round trip exception backtracesAaron Patterson2019-06-251-0/+14
| | | | This commit allows exception backtraces to round trip
* Make rubygems follow the upstream of psychnobu2018-11-111-20/+20
| | | | | | And merge psych again. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert "Merge psych from upstream."mame2018-11-101-20/+20
| | | | | | | | This reverts commit db3101ff301b8e6f52170df0891f4fc35579354f. This caused build error: http://ci.rvm.jp/results/trunk-test@ruby-sky3/1452708 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Merge psych from upstream.hsbt2018-11-101-20/+20
| | | | | | * https://github.com/ruby/psych/pull/378 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Merge Pysch-3.1.0.pre2 from ruby/psych.hsbt2018-10-204-9/+29
| | | | | | * 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-274-14/+309
| | | | | | | | | * 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-282-0/+53
| | | | | | | | | 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-012-14/+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-275-5/+108
| | | | 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-1445-56/+67
| | | | | | | | | * 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
* Merge psych-3.0.0.beta2 from https://github.com/ruby/psychhsbt2017-06-162-0/+48
| | | | | | | | | | | | 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
* Import psych-3.0.0.beta1 from ruby/psych.hsbt2017-04-0511-231/+42
| | | | | | | | * 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
* * ext/psych/*, test/psych/*: Update psych-2.1.1hsbt2016-09-072-0/+8
| | | | | | | | This version fixed following pull requests. https://github.com/tenderlove/psych/pull/284 https://github.com/tenderlove/psych/pull/276 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e