Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Update test libraries from ↵ | Hiroshi SHIBATA | 2023-03-24 | 2 | -68/+109 |
| | | | | https://github.com/ruby/ruby/commit/b4e438d8aabaf4bba2b27f374c787543fae07c58 | ||||
* | Fix RestrictedYAMLTree allowing the Symbol class should allow all symbols | Jean Boussier | 2023-01-22 | 1 | -2/+5 |
| | | | | | | | | | | | | 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. | ||||
* | Update for stricter 1.2 syntax | Charles Oliver Nutter | 2023-01-18 | 1 | -16/+16 |
| | | | | | This allows these tests to pass on SnakeYAML Engine -- which is a 1.2-only YAML library -- while still passing on libyaml 1.1. | ||||
* | Get rid of anonymous eval calls | Jean Boussier | 2023-01-11 | 2 | -4/+4 |
| | | | | Things declared in anonymous eval are always annoying to locate. | ||||
* | Always issue deprecation warning when calling Regexp.new with 3rd positional ↵ | Jeremy Evans | 2022-12-23 | 1 | -1/+1 |
| | | | | | | | | | | | | | | argument Previously, only certain values of the 3rd argument triggered a deprecation warning. First step for fix for bug #18797. Support for the 3rd argument will be removed after the release of Ruby 3.2. Fix minor fallout discovered by the tests. Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org> | ||||
* | Only ignore current failures in JRuby | David Rodríguez | 2022-10-07 | 3 | -0/+21 |
| | | | | | This way we should be able to prevent new regressions from being introduced. | ||||
* | Dump Date/DateTime as proleptic Gregorian date as well as Time | Nobuyoshi Nakada | 2022-08-09 | 1 | -0/+20 |
| | | | | Fix ruby/psych#572 | ||||
* | Raise specific error when an anchor isn't defined | Alexander Momchilov | 2022-07-27 | 2 | -2/+2 |
| | |||||
* | Update to squiggly heredocs in the file | Alexander Momchilov | 2022-07-27 | 1 | -12/+12 |
| | |||||
* | Add test for missing anchor | Alexander Momchilov | 2022-07-27 | 1 | -0/+11 |
| | |||||
* | Add test for anchor reuse | Alexander Momchilov | 2022-07-27 | 1 | -0/+11 |
| | | | | | The spec calls this a "reuse" of an anchor https://yaml.org/spec/1.2.2/#71-alias-nodes | ||||
* | Raise specific error when aliases are not enabled | Alexander Momchilov | 2022-07-27 | 6 | -8/+8 |
| | |||||
* | Don't hardcode expected alias names | Alexander Momchilov | 2022-07-27 | 3 | -22/+28 |
| | |||||
* | Test that recursive refs dump as aliases | Alexander Momchilov | 2022-07-22 | 3 | -0/+37 |
| | |||||
* | Clarify tests about parsing aliases | Alexander Momchilov | 2022-07-22 | 1 | -8/+21 |
| | |||||
* | Add strict_integer option to parse numbers with commas as strings | Seth Boyles | 2022-01-14 | 2 | -0/+36 |
| | | | | Authored-by: Seth Boyles <sethboyles@gmail.com> | ||||
* | s/RubyVM::JIT/RubyVM::MJIT/g | Takashi Kokubun | 2021-12-14 | 1 | -1/+1 |
| | |||||
* | test/psych/test_scalar_scanner.rb: Prevent a warning | Yusuke Endoh | 2021-09-28 | 1 | -1/+1 |
| | | | | | | | ``` [ 4696/20990] TestAst#test_ranges:test/psych/test_scalar_scanner.rb(none):138: warning: ambiguous first argument; put parentheses or a space even after `-' operator ``` http://rubyci.s3.amazonaws.com/ubuntu/ruby-master/log/20210909T123007Z.log.html.gz | ||||
* | Bump up the latest version of CoreAssertions | Hiroshi SHIBATA | 2021-09-11 | 1 | -30/+34 |
| | |||||
* | Replace A-Za-z with [:alpha:] | jory-graham | 2021-08-05 | 1 | -0/+22 |
| | |||||
* | Merge pull request #515 from ruby/quote-y-n | Aaron Patterson | 2021-08-04 | 1 | -0/+13 |
|\ | | | | | Add quotes to the strings "y" and "n" | ||||
| * | Add quotes to the strings "y" and "n" | Aaron Patterson | 2021-08-04 | 1 | -0/+13 |
| | | | | | | | | | | | | | | | | | | | | 'y' and 'n' are kind of ambiguous. Syck treated y and n literals in YAML documents as strings. But this is not what the YAML 1.1 spec says. YAML 1.1 says they should be treated as booleans. When we're dumping documents, we know it's a string, so adding quotes will eliminate the "ambiguity" in the emitted document Fixes #443 | ||||
* | | Merge pull request #460 from tbrisker/floatscanner | Aaron Patterson | 2021-08-04 | 1 | -0/+12 |
|\ \ | | | | | | | Improve float scalar scanner | ||||
| * | | Improve float scalar scanner | Tomer Brisker | 2020-08-08 | 1 | -0/+12 |
| | | | | | | | | | | | | | | | | | | | | | Previously, `+.inf` was not handled correctly. Additionally, the regexp was checking for inf and NaN, even though these cases are handled earlier in the condition. Added a few tests to ensure handling some missing cases. | ||||
* | | | Merge pull request #473 from OpakAlex/fix-integer-parsing-for-yaml | Aaron Patterson | 2021-08-04 | 1 | -2/+13 |
|\ \ \ | |_|/ |/| | | fix parsing integer values with '_' at the end | ||||
| * | | add more tests | Alexandr Opak | 2021-01-29 | 1 | -2/+6 |
| | | | |||||
| * | | fix typo | Alexandr Opak | 2021-01-29 | 1 | -2/+2 |
| | | | |||||
| * | | fix parsing integer values with '_' at the end | Alexandr Opak | 2021-01-29 | 1 | -1/+8 |
| | | | |||||
* | | | Merge pull request #507 from ahorek/delegate_fix | Hiroshi SHIBATA | 2021-06-16 | 1 | -0/+1 |
|\ \ \ | | | | | | | | | require 'delegate' explicitly | ||||
| * | | | require 'delegate' explicitly | Pavel Rosický | 2021-06-07 | 1 | -0/+1 |
| | | | | |||||
* | | | | Fix the test that does not work with libyaml-0.1.7 | Yusuke Endoh | 2021-06-07 | 1 | -1/+1 |
|/ / / | |||||
* | | | Do not use YAML module in tests of Psych | Hiroshi SHIBATA | 2021-06-07 | 1 | -8/+8 |
| | | | |||||
* | | | Use assert_raise instead of assert_raises | Hiroshi SHIBATA | 2021-06-07 | 1 | -4/+4 |
| | | | |||||
* | | | test/psych/test_coder.rb: Suppress non-parenthesis warnings | Yusuke Endoh | 2021-06-07 | 1 | -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 ``` | ||||
* | | | Suppress debug message | Nobuyoshi Nakada | 2021-06-07 | 1 | -0/+1 |
| | | | |||||
* | | | Implement YAML.safe_dump to make safe_load more usable. | Jean Boussier | 2021-05-19 | 1 | -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. | ||||
* | | | Make the test pass with the old libyaml | Yusuke Endoh | 2021-05-17 | 1 | -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 argument | Yusuke Endoh | 2021-05-17 | 1 | -15/+15 |
| | | | |||||
* | | | remove deprecated interface | Aaron Patterson | 2021-05-13 | 3 | -68/+2 |
| | | | |||||
* | | | Introduce `Psych.unsafe_load` | Aaron Patterson | 2021-05-13 | 24 | -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. | ||||
* | | | Merge pull request #475 from whitehat101/feature/dynamic-scalar-seq-style | Aaron Patterson | 2021-05-10 | 1 | -0/+121 |
|\ \ \ | | | | | | | | | feat: allow scalars and sequences to be styled when dumped | ||||
| * | | | feat: allow scalars and sequences to be styled when dumped | Jeremy Ebler | 2021-02-07 | 1 | -0/+121 |
| |/ / | |||||
* | | | Merge pull request #480 from Shopify/symbolize-name-non-string-keys | Hiroshi SHIBATA | 2021-05-10 | 1 | -3/+4 |
|\ \ \ | | | | | | | | | Fix symbolize_name with non-string keys | ||||
| * | | | Fix symabolize_name with non-string keys | Jean Boussier | 2021-02-25 | 1 | -3/+4 |
| | | | | |||||
* | | | | Use assert_raise instead of assert_raises | Hiroshi SHIBATA | 2021-05-10 | 12 | -61/+61 |
| | | | | |||||
* | | | | Removed needless platform detection | Hiroshi SHIBATA | 2021-05-10 | 1 | -10/+0 |
| | | | | |||||
* | | | | Import test assertions from ruby/ruby | Hiroshi SHIBATA | 2021-05-10 | 4 | -0/+1167 |
| | | | | |||||
* | | | | Use pend instead of skip | Hiroshi SHIBATA | 2021-05-10 | 2 | -2/+2 |
| | | | | |||||
* | | | | Fixed test-case for NaN | Hiroshi SHIBATA | 2021-05-10 | 1 | -2/+2 |
| | | | | |||||
* | | | | Use Ractor constant for ignoreing condition | Hiroshi SHIBATA | 2021-05-10 | 1 | -1/+1 |
| | | | |