355 Commits

Author SHA1 Message Date
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
Yusuke Endoh
a3cc9b3c8e Avoid requiring "psych/versions"
This leads to double requiring "ext/psych/lib/psych/versions.rb" and
".ext/common/psych/versions.rb", which produces doxens of warnings
during `make test-all`.

http://rubyci.s3.amazonaws.com/ubuntu2004/ruby-master/log/20200608T123004Z.log.html.gz
```
[15092/20234]
TestRDocOptions#test_init_with_encoding/home/chkbuild/chkbuild/tmp/build/20200608T123004Z/ruby/ext/psych/lib/psych.rb:233: warning: already initialized constant Psych::LIBYAML_VERSION
/home/chkbuild/chkbuild/tmp/build/20200608T123004Z/ruby/.ext/common/psych.rb:233: warning: previous definition of LIBYAML_VERSION was here
/home/chkbuild/chkbuild/tmp/build/20200608T123004Z/ruby/ext/psych/lib/psych.rb:235: warning: already initialized constant Psych::NOT_GIVEN
/home/chkbuild/chkbuild/tmp/build/20200608T123004Z/ruby/.ext/common/psych.rb:235: warning: previous definition of NOT_GIVEN was here
/home/chkbuild/chkbuild/tmp/build/20200608T123004Z/ruby/ext/psych/lib/psych.rb:271: warning: method redefined; discarding old load
/home/chkbuild/chkbuild/tmp/build/20200608T123004Z/ruby/.ext/common/psych.rb:271: warning: previous definition of load was here
...
```

The same issue happened in fiddle.gemspec, and this change applies the
same fix as [fiddle](https://github.com/ruby/fiddle/issues/34).
2020-06-09 00:27:04 +09:00
Po-Chuan Hsieh
6b9e363aa0 [ruby/psych] Add LICENSE to the gem
https://github.com/ruby/psych/commit/02919596fa
2020-06-05 11:49:56 +09:00
David Rodríguez
cd3d035e8a [ruby/psych] Remove unnecessary version guard from versions.rb
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
2020-06-05 11:49:56 +09:00
Mark Thorn
f245976386 [ruby/psych] Fix ArgumentError with leading and trailing underscores in number strings.
https://github.com/ruby/psych/commit/ac2d2c9b1b
2020-06-05 11:49:56 +09:00
David Rodríguez
5ed58b90d1 [ruby/psych] Fix gem installation
Current version is not installable because the gemspec is invalid, since
it includes a `.travis.yml` file that no longer exists, so `rake
install` fails like this:

```
$ rake install
rake aborted!
WARNING:  See https://guides.rubygems.org/specification-reference/ for help
ERROR:  While executing gem ... (Gem::InvalidSpecificationException)
    [".travis.yml"] are not files
```

https://github.com/ruby/psych/commit/32b18ca7ca
2020-06-05 11:49:56 +09:00
Jean Boussier
f641d78a6f [ruby/psych] Implement freeze option for Pysch.load
https://github.com/ruby/psych/commit/7dae24894d
2020-06-05 11:49:56 +09:00
Jean Boussier
4085c51a51 [ruby/psych] Implement a freeze load option
https://github.com/ruby/psych/commit/04f97f7a56
2020-06-05 11:49:56 +09:00
Jean Boussier
591a3326e3 [ruby/psych] Refactor symbolize_names
https://github.com/ruby/psych/commit/3e472ab2d7
2020-06-05 11:49:56 +09:00
卜部昌平
9e41a75255 sed -i 's|ruby/impl|ruby/internal|'
To fix build failures.
2020-05-11 09:24:08 +09:00
卜部昌平
d7f4d732c1 sed -i s|ruby/3|ruby/impl|g
This shall fix compile errors.
2020-05-11 09:24:08 +09:00
Nobuyoshi Nakada
d8720eb7de
Suppress -Wshorten-64-to-32 warnings 2020-04-08 16:28:38 +09:00
卜部昌平
9e6e39c351
Merge pull request #2991 from shyouhei/ruby.h
Split ruby.h
2020-04-08 13:28:13 +09:00
Nobuyoshi Nakada
75b644350a
ext/psych/extconf.rb: braced VPATH is for nmake only 2019-12-05 17:57:56 +09:00
Nobuyoshi Nakada
a593186a02
Nmake needs VPATH 2019-11-29 11:09:08 +09:00
Nobuyoshi Nakada
98006cea4f
Add dependency on bundled yaml.h when using 2019-11-29 10:16:33 +09:00
Vít Ondruch
994435d0ef Revert "Update dependencies"
This reverts commit e1b234148829f65bea9f5ecc7018beb782ea6023.

This allows to build Psych against system libyaml again on Fedora.

[Bug #16359]
2019-11-22 22:42:33 +09:00
Nobuyoshi Nakada
e1b2341488
Update dependencies 2019-11-18 23:16:22 +09:00
Aaron Patterson
db33ab470c
[ruby/psych] Add a note about safe_load
https://github.com/ruby/psych/commit/0910ae5575
2019-11-12 10:43:54 +09:00
Jeremy Evans
30fdee65d9
[ruby/psych] Remove taint support
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-11-12 10:35:47 +09:00
Jean Boussier
5ef41c91f0 [ruby/psych] Set required_ruby_version to 2.4.0
https://github.com/ruby/psych/commit/4f1746a3c6
2019-11-12 10:30:45 +09:00
Yusuke Endoh
571ffcd609 ext/psych/yaml/api.c: Suppress a "variable set but not used" warning
```
compiling ../.././ext/psych/yaml/api.c
../.././ext/psych/yaml/api.c: In function 'yaml_document_delete':
../.././ext/psych/yaml/api.c:1122:7: warning: variable 'context' set but not used [-Wunused-but-set-variable]
     } context;
       ^~~~~~~
```
https://rubyci.org/logs/rubyci.s3.amazonaws.com/ubuntu1604/ruby-master/log/20190824T093004Z.log.html.gz
2019-08-24 20:31:16 +09:00
Yusuke Endoh
58a478bce4 ext/psych/yaml/loader.c: Cast the difference of pointers to int
instead of casting a pointer to int.
Follow up of 39622232c7542d062f79277a11f6b8b6b6cfd994.
2019-08-05 14:38:59 +09:00
Hiroshi SHIBATA
39622232c7
Suppress warnings of bundled libyaml. 2019-08-04 20:12:43 +09:00
David Carlier
2d189a6721
yaml few build warning fixes
Closes: https://github.com/ruby/ruby/pull/2283
2019-08-04 09:46:46 +09:00
Nobuyoshi Nakada
414d6cf1d3 [ruby/psych] Get rid of C90 feature
For ruby 2.6 and earlier.

https://travis-ci.org/ruby/psych/jobs/562435717#L245-L248

```
../../../../ext/psych/psych_parser.c: In function ‘make_exception’:
../../../../ext/psych/psych_parser.c:87:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
     VALUE ePsychSyntaxError = rb_const_get(mPsych, rb_intern("SyntaxError"));
     ^
```

https://github.com/ruby/psych/commit/aa457443b8
2019-07-25 07:52:19 +09:00
Jean Boussier
6ca7dc69ef [ruby/psych] Deduplicate hash keys if they're strings
https://github.com/ruby/psych/commit/0414982ffd
2019-07-25 07:52:16 +09:00
Hiroshi SHIBATA
50076903ab
[ruby/psych] Drop to support fat gem support.
ref. https://github.com/ruby/bigdecimal/pull/149

https://github.com/ruby/psych/commit/25ae263252
2019-07-25 07:50:37 +09:00
Hiroshi SHIBATA
938032a790
[ruby/psych] Do not use add_development_dependency.
https://github.com/ruby/psych/commit/939754237f
2019-07-25 07:47:07 +09:00
Nobuyoshi Nakada
715955ff27
Include ruby/assert.h in ruby/ruby.h so that assertions can be there 2019-07-14 17:58:03 +09:00
Jean Boussier
746812ee96 Do not allocate a string to check if a scalar is an integer 2019-06-25 15:56:20 +09:00
Jean Boussier
5a4d2b9f2f Remove string_cache in ScalarScanner 2019-06-25 15:56:20 +09:00
Jean Boussier
63f78bbaae Reduce string allocations in scalar_scanner 2019-06-25 15:56:20 +09:00
SHIBATA Hiroshi
00d0ede845 Removed CHANGELOG from rdoc files. 2019-06-25 15:56:20 +09:00
SHIBATA Hiroshi
3c4fc830dd Retired to write CHANGELOG.rdoc. Because It has no update from 2015. 2019-06-25 15:56:20 +09:00
Aaron Patterson
03dac55f90 Dump Hash ivars before elements
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-25 15:56:20 +09:00
Aaron Patterson
a53ab897c3 Round trip exception backtraces
This commit allows exception backtraces to round trip
2019-06-25 15:56:20 +09:00
Aaron Patterson
f770a5be66 Refactor exception dumping 2019-06-25 15:56:20 +09:00