Граф коммитов

392 Коммитов

Автор SHA1 Сообщение Дата
卜部昌平 5c167a9778 ruby tool/update-deps --fix 2021-10-05 14:18:23 +09:00
jory-graham db154b20cc [ruby/psych] Replace A-Za-z with [:alpha:]
https://github.com/ruby/psych/commit/8ec36494fb
2021-08-31 19:34:54 +09:00
Aaron Patterson 9ed2cb26de [ruby/psych] Add quotes to the strings "y" and "n"
'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

https://github.com/ruby/psych/commit/6a1c30634e
2021-08-31 19:34:46 +09:00
opak 0925fddc80 [ruby/psych] Update lib/psych/scalar_scanner.rb
https://github.com/ruby/psych/commit/64cc239557

Co-authored-by: Olle Jonsson <olle.jonsson@gmail.com>
2021-08-31 19:34:36 +09:00
Alexandr Opak 44353d0dee [ruby/psych] add more tests
https://github.com/ruby/psych/commit/8f71222bf3
2021-08-31 19:34:28 +09:00
Alexandr Opak 48b50cb4fe [ruby/psych] fix parsing integer values with '_' at the end
https://github.com/ruby/psych/commit/e0bb853014
2021-08-31 19:34:13 +09:00
Tomer Brisker 31ba0921f8 [ruby/psych] Improve float scalar scanner
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.

https://github.com/ruby/psych/commit/6e0e7a1e9f
2021-08-31 19:34:06 +09:00
Rhys Powell e99d2d066f [ruby/psych] fix: use git repository link for LibYAML in docs
LibYAML has moved from their previous Mercurial based hosting on BitBucket to a git repository on GitHub. This commit updates the `Psych` module's documentation to point to this new repository, instead of the old one which is now a 404.

https://github.com/ruby/psych/commit/947a84d0dd
2021-07-29 15:54:41 +09:00
Hiroshi SHIBATA 85b94144f2
[ruby/psych] Bump version to 4.0.1
https://github.com/ruby/psych/commit/4049939006
2021-06-07 19:15:14 +09:00
Jean Boussier fd6225c7a9
[ruby/psych] Implement YAML.safe_dump to make safe_load more usable.
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
2021-06-07 19:15:14 +09:00
Yusuke Endoh 430883158f
[ruby/psych] Make YAML.load_file use YAML.load instead of safe_load
YAML.load and YAML.safe_load are different a little; the former allows
Symbol by default but the latter doesn't. So YAML.load_file and
YAML.safe_load_file should reflect the difference.

Fixes #490

https://github.com/ruby/psych/commit/f8a5e512a1
2021-06-07 19:15:14 +09:00
Aaron Patterson 42b20bdbfe
[ruby/psych] remove deprecated interface
https://github.com/ruby/psych/commit/0767227051
2021-05-17 11:20:46 +09:00
Aaron Patterson b0e21197ce
[ruby/psych] Bump version
https://github.com/ruby/psych/commit/1df86a2e81
2021-05-17 11:20:46 +09:00
Aaron Patterson fbb4e3f96c
[ruby/psych] Use Psych.safe_load by default
Psych.load is not safe for use with untrusted data.  Too many
applications make the mistake of using `Psych.load` with untrusted data
and that ends up with some kind of security vulnerability.

This commit changes the default `Psych.load` to use `safe_load`.  Users
that want to parse trusted data can use Psych.unsafe_load.

https://github.com/ruby/psych/commit/176494297f
2021-05-17 11:20:45 +09:00
Aaron Patterson c7c2ad5749
[ruby/psych] Introduce `Psych.unsafe_load`
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 11:20:45 +09:00
Jean Boussier a3ceed50b8
[ruby/psych] Fix symabolize_name with non-string keys
https://github.com/ruby/psych/commit/1c5c29e81f
2021-05-17 11:20:45 +09:00
Jeremy Ebler 830778db95
[ruby/psych] feat: allow scalars and sequences to be styled when dumped
https://github.com/ruby/psych/commit/546154ddb7
2021-05-17 11:20:45 +09:00
Ryuta Kamizono 73136ebbde
[ruby/psych] Fix some typos [ci skip]
https://github.com/ruby/psych/commit/98617e55a1
2021-05-10 19:19:35 +09:00
Aaron Patterson b7250026dd
[ruby/psych] bump version
https://github.com/ruby/psych/commit/091cd46b1f
2021-05-10 19:19:35 +09:00
Tim Gates 954970162c
[ruby/psych] docs: fix simple typo, expessed -> expressed
There is a small typo in ext/psych/yaml/yaml.h.

Should read `expressed` rather than `expessed`.

https://github.com/ruby/psych/commit/1150d669cb
2021-05-10 19:19:35 +09:00
Charles Oliver Nutter 1563de5997
[ruby/psych] Update to latest SnakeYAML
Fixes jruby/jruby#6365

https://github.com/ruby/psych/commit/a88ff77f02
2021-05-10 19:19:35 +09:00
Jean Boussier c110ade0d2
[ruby/psych] Fix custom marshalization with symbolize_names: true
https://github.com/ruby/psych/commit/ee26f26ab5
2021-05-10 19:17:32 +09:00
Jean Boussier 155cd7fd2a
[ruby/psych] Cache dispatch cache in an instance variable
https://github.com/ruby/psych/commit/285c461cd2
2021-05-10 19:17:32 +09:00
Jean Boussier 3ab41acd36
[ruby/psych] Cache access to Psych.load_tags in Visitor::ToRuby
https://github.com/ruby/psych/commit/58223f0426
2021-05-10 19:17:32 +09:00
Benoit Daloze 0764d323d8 Fix -Wundef warnings for patterns `#if HAVE`
* See [Feature #17752]
* Using this to detect them:
  git grep -P 'if\s+HAVE' | grep -Pv 'HAVE_LONG_LONG|/ChangeLog|HAVE_TYPEOF'
2021-05-04 14:56:55 +02:00
卜部昌平 6413dc27dc dependency updates 2021-04-13 14:30:21 +09:00
Nobuyoshi Nakada 94d564077c
Text files should end with a newline 2021-03-30 23:41:21 +09:00
Samuel Williams 5f69a7f604
Expose scheduler as public interface & bug fixes. (#3945)
* Rename `rb_scheduler` to `rb_fiber_scheduler`.

* Use public interface if available.

* Use `rb_check_funcall` where possible.

* Don't use `unblock` unless the fiber was non-blocking.
2021-02-09 19:39:56 +13:00
Hiroshi SHIBATA 684649ea05 [ruby/psych] Bump version to 3.3.0
https://github.com/ruby/psych/commit/0abce07b90
2020-12-23 19:53:21 +09:00
Marc-Andre Lafortune daec109f42 [ruby/psych] Optimize cache with `compare_by_identity`
Using `compare_by_identity` gives a 4x performance boost on cache hits.
Benchmark in https://github.com/JuanitoFatas/fast-ruby/issues/189
2020-12-23 01:08:38 -05:00
Marc-Andre Lafortune c5a445d577 [ruby/psych] Make Ractor-ready.
Config is Ractor-local.

Benchmarking reveals that using `Ractor.local_storage` for storing cache
is similar to accessing a constant (~15% slower).
2020-12-23 01:08:38 -05:00
Marc-Andre Lafortune 3ee0ad9190 [ruby/psych] Don't use instance variables directly for config 2020-12-23 01:08:38 -05:00
Marc-Andre Lafortune d1963adae8 [ruby/psych] Avoid methods depending on bindings
Improves Ractor-readiness.
2020-12-23 01:08:38 -05:00
Marc-Andre Lafortune 0eb94dae4a [ruby/psych] Freeze constants.
Improves Ractor-readiness.
2020-12-23 01:08:38 -05:00
Nobuyoshi Nakada 5c9d6ea6b4
Strip trailing spaces [ci skip] 2020-12-19 15:34:37 +09:00
Hiroshi SHIBATA c2a60fec2f
Merge Psych-3.2.1 from ruby/psych 2020-12-14 20:13:12 +09:00
Nobuyoshi Nakada 21b199bb24
Appended a newline to suppress newline-eof warning 2020-10-06 23:18:42 +09:00
Jean Boussier b72f9200ac
[ruby/psych] Forward keyword arguments in load_file and load_stream
https://github.com/ruby/psych/commit/4e1dd37f09
2020-09-25 13:11:33 +09:00
Hiroshi SHIBATA 8ea1021f19
[ruby/psych] Bump version to 3.2.0
https://github.com/ruby/psych/commit/181a727c90
2020-09-25 13:11:33 +09:00
SzymonKowalczyk 263c43487f
[ruby/psych] Revert psych version
https://github.com/ruby/psych/commit/55a294fcd0
2020-09-25 13:11:33 +09:00
SzymonKowalczyk f794c928a0
[ruby/psych] Update SNAKEYAML CVE-2017-18640
to version 1.26
https://github.com/ruby/psych/commit/b2802135e7
2020-09-25 13:11:32 +09:00
Charles Oliver Nutter 33641e00cd
Remove private_iv_get
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-09-25 13:11:32 +09:00
卜部昌平 490010084e sed -i '/rmodule.h/d' 2020-08-27 16:42:06 +09:00
卜部昌平 756403d775 sed -i '/r_cast.h/d' 2020-08-27 15:03:36 +09:00
卜部昌平 0da2a3f1fc sed -i '\,2/extern.h,d' 2020-08-27 14:07:49 +09:00
Nobuyoshi Nakada 9a78e24f7d
Removed nonsense `rubygems_version` in input gemspec files
As it is ignored and set at building packages automatically, it is
just nonsense to set in gemspec file for input.
2020-06-25 15:44:56 +09:00
Hiroshi SHIBATA 078e94106d
[ruby/psych] Fixup 05d7e818a6abe3ee1c56b6be92f086647d73141c
https://github.com/ruby/psych/commit/4e7794fc2c
2020-06-23 15:26:29 +09:00
Hiroshi SHIBATA 7cdfc2b5fc
[ruby/psych] Bump version strings for header file
https://github.com/ruby/psych/commit/68da645c7e
2020-06-23 15:26:29 +09:00
Hiroshi SHIBATA 70a4599869
[ruby/psych] Bump libyaml version to 0.2.5
https://github.com/ruby/psych/commit/39996192cc
2020-06-23 15:26:29 +09:00
Jean Boussier 666c077691
[ruby/psych] Fix anchor lookup with symbolized names
https://github.com/ruby/psych/commit/ef74fc01e2
2020-06-23 15:26:29 +09:00