summaryrefslogtreecommitdiff
path: root/ext/psych/lib/psych
AgeCommit message (Collapse)Author
2021-05-17[ruby/psych] Bump versionAaron Patterson
https://github.com/ruby/psych/commit/1df86a2e81
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-17[ruby/psych] Fix symabolize_name with non-string keysJean Boussier
https://github.com/ruby/psych/commit/1c5c29e81f
2021-05-17[ruby/psych] feat: allow scalars and sequences to be styled when dumpedJeremy Ebler
https://github.com/ruby/psych/commit/546154ddb7
2021-05-10[ruby/psych] Fix some typos [ci skip]Ryuta Kamizono
https://github.com/ruby/psych/commit/98617e55a1
2021-05-10[ruby/psych] bump versionAaron Patterson
https://github.com/ruby/psych/commit/091cd46b1f
2021-05-10[ruby/psych] Update to latest SnakeYAMLCharles Oliver Nutter
Fixes jruby/jruby#6365 https://github.com/ruby/psych/commit/a88ff77f02
2021-05-10[ruby/psych] Fix custom marshalization with symbolize_names: trueJean Boussier
https://github.com/ruby/psych/commit/ee26f26ab5
2021-05-10[ruby/psych] Cache dispatch cache in an instance variableJean Boussier
https://github.com/ruby/psych/commit/285c461cd2
2021-05-10[ruby/psych] Cache access to Psych.load_tags in Visitor::ToRubyJean Boussier
https://github.com/ruby/psych/commit/58223f0426
2020-12-23[ruby/psych] Bump version to 3.3.0Hiroshi SHIBATA
https://github.com/ruby/psych/commit/0abce07b90
2020-12-23[ruby/psych] Optimize cache with `compare_by_identity`Marc-Andre Lafortune
Using `compare_by_identity` gives a 4x performance boost on cache hits. Benchmark in https://github.com/JuanitoFatas/fast-ruby/issues/189 Notes: Merged: https://github.com/ruby/ruby/pull/3953
2020-12-23[ruby/psych] Make Ractor-ready.Marc-Andre Lafortune
Config is Ractor-local. Benchmarking reveals that using `Ractor.local_storage` for storing cache is similar to accessing a constant (~15% slower). Notes: Merged: https://github.com/ruby/ruby/pull/3953
2020-12-23[ruby/psych] Avoid methods depending on bindingsMarc-Andre Lafortune
Improves Ractor-readiness. Notes: Merged: https://github.com/ruby/ruby/pull/3953
2020-12-23[ruby/psych] Freeze constants.Marc-Andre Lafortune
Improves Ractor-readiness. Notes: Merged: https://github.com/ruby/ruby/pull/3953
2020-12-14Merge Psych-3.2.1 from ruby/psychHiroshi SHIBATA
2020-09-25[ruby/psych] Bump version to 3.2.0Hiroshi SHIBATA
https://github.com/ruby/psych/commit/181a727c90
2020-09-25[ruby/psych] Revert psych versionSzymonKowalczyk
https://github.com/ruby/psych/commit/55a294fcd0
2020-09-25[ruby/psych] Update SNAKEYAML CVE-2017-18640SzymonKowalczyk
to version 1.26 https://github.com/ruby/psych/commit/b2802135e7
2020-09-25Remove private_iv_getCharles Oliver Nutter
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.
2020-06-23[ruby/psych] Fix anchor lookup with symbolized namesJean Boussier
https://github.com/ruby/psych/commit/ef74fc01e2
2020-06-05[ruby/psych] Remove unnecessary version guard from versions.rbDavid Rodríguez
Removing it triggers the following warnings when running `bundle` under jruby from the root of the `psych` repo prints the following warnings: ``` /path/to/jruby-9.2.9.0/lib/ruby/gems/shared/gems/psych-3.1.0-java/lib/psych/versions.rb:7: warning: already initialized constant VERSION /path/to//jruby-9.2.9.0/lib/ruby/gems/shared/gems/psych-3.1.0-java/lib/psych/versions.rb:10: warning: already initialized constant DEFAULT_SNAKEYAML_VERSION ``` This is because bundler loads the versions file relatively from the local gemspec, and then internally loads the psych gem, causing the redefinition warnings. Instead, we modify the $LOAD_PATH so that when working locally on the `psych` repo, the local version of `psych` gets used. https://github.com/ruby/psych/commit/a3fc8191a7 Notes: Merged: https://github.com/ruby/ruby/pull/3188
2020-06-05[ruby/psych] Fix ArgumentError with leading and trailing underscores in ↵Mark Thorn
number strings. https://github.com/ruby/psych/commit/ac2d2c9b1b Notes: Merged: https://github.com/ruby/ruby/pull/3188
2020-06-05[ruby/psych] Implement `freeze` option for Pysch.loadJean Boussier
https://github.com/ruby/psych/commit/7dae24894d Notes: Merged: https://github.com/ruby/ruby/pull/3188
2020-06-05[ruby/psych] Implement a freeze load optionJean Boussier
https://github.com/ruby/psych/commit/04f97f7a56 Notes: Merged: https://github.com/ruby/ruby/pull/3188
2020-06-05[ruby/psych] Refactor `symbolize_names`Jean Boussier
https://github.com/ruby/psych/commit/3e472ab2d7 Notes: Merged: https://github.com/ruby/ruby/pull/3188
2019-11-12[ruby/psych] Remove taint supportJeremy Evans
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
2019-07-25[ruby/psych] Deduplicate hash keys if they're stringsJean Boussier
https://github.com/ruby/psych/commit/0414982ffd
2019-06-25Do not allocate a string to check if a scalar is an integerJean Boussier
2019-06-25Remove string_cache in ScalarScannerJean Boussier
2019-06-25Reduce string allocations in scalar_scannerJean Boussier
2019-06-25Dump Hash ivars before elementsAaron Patterson
When the Hash is revived, the ivars will be set before elements. This is for the case when the hash setter depends on ivars set on the hash.
2019-06-25Round trip exception backtracesAaron Patterson
This commit allows exception backtraces to round trip
2019-06-25Refactor exception dumpingAaron Patterson
2019-06-25Dumping the backtrace never worked, so remove itAaron Patterson
Dumping the backtrace for exceptions never worked, so lets remove it.
2018-12-18Bump version to psych 3.1.0.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-20Merge Pysch-3.1.0.pre2 from ruby/psych.hsbt
* 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
2018-09-01Re-try to add workaround for warningskazu
``` .../ext/psych/lib/psych/versions.rb:4: warning: already initialized constant Psych::VERSION .../.ext/common/psych/versions.rb:4: warning: previous definition of VERSION was here ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-31Revert "Try to add workaround for warnings"kazu
This reverts commit a5e5cfa3f650d4e78fb50e2df15c102ab56fca3c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-31Try to add workaround for warningskazu
``` .../ext/psych/lib/psych/versions.rb:4: warning: already initialized constant Psych::VERSION .../.ext/common/psych/versions.rb:4: warning: previous definition of VERSION was here ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27Merge psych-3.1.0.pre1.hsbt
* 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
2018-04-28Merge Pysch 3.0.3.pre1.hsbt
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
2017-12-19Merge psych-3.0.2 from ruby/psych.hsbt
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
2017-12-01Merge psych-3.0.0.hsbt
See NEWS file for this update details. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-27Merge psych-3.0.0.beta4 from upstream.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-14Fixup r59327. Forgot to update version number.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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
2017-02-24Update psych-2.2.3hsbt
* It's only typo fix for CRuby. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e