Commit graph

8755 commits

Author SHA1 Message Date
Matt Valentine-House
72aba64fff Merge gc.h and internal/gc.h
[Feature #19425]
2023-02-09 10:32:29 -05:00
Nobuyoshi Nakada
899ea35035
Extract include/ruby/internal/attr/packed_struct.h
Split `PACKED_STRUCT` and `PACKED_STRUCT_UNALIGNED` macros into the
macros bellow:
* `RBIMPL_ATTR_PACKED_STRUCT_BEGIN`
* `RBIMPL_ATTR_PACKED_STRUCT_END`
* `RBIMPL_ATTR_PACKED_STRUCT_UNALIGNED_BEGIN`
* `RBIMPL_ATTR_PACKED_STRUCT_UNALIGNED_END`
2023-02-08 12:34:13 +09:00
Charles Oliver Nutter
a66bc448a4 [ruby/psych] Bump version to 5.1 for release
This version primarily updates the JRuby extension to use
SnakeYAML Engine, a newer version of the SnakeYAML library, which
also updates YAML support to 1.2. The JRuby extension now also
exposes settings for the parser.

6f2b16b343
2023-02-07 12:25:44 +00:00
Nobuyoshi Nakada
cbd5de4f88 [ruby/stringio] Development of 3.0.6 started.
a7561f447b
2023-02-03 07:49:31 +00:00
Nobuyoshi Nakada
89d9547800 [ruby/stringio] Revert "bump up to 3.0.6" [ci skip]
This reverts commit 325933500b.
It is bumped to 3.0.5 in advance but not released yet.

af67c36693
2023-02-02 12:44:53 +00:00
Nobuyoshi Nakada
8087ba736e [ruby/stringio] bump up to 3.0.6
325933500b
2023-02-02 04:44:38 +00:00
Nobuyoshi Nakada
fad48fefe1 [Bug #19399] Parsing invalid heredoc inside block parameter
Although this is of course invalid as Ruby code, allow to just parse
and tokenize.
2023-02-02 12:20:10 +09:00
Peter Zhu
aa222b56fa [ruby/bigdecimal] Make BigDecimal WB protected
BigDecimal has no references, so it is WB protected.

29c61c90e8
2023-02-01 15:59:11 +00:00
Mau Magnaguagno
5b67c15cd8
[ruby/openssl] [DOC] Remove repeated example from Digest
5a36cc3cb2
2023-01-31 13:14:06 +09:00
Charles Oliver Nutter
0ee819b71d
Initial move to SnakeYAML Engine
See jruby/jruby#7570 for some of the justification for this move. We only
require the parser from SnakeYAML, but in the original form it is
encumbered with Java object serialization code that keeps getting
flagged as a CVE risk. We disagree with the assessment, at least
as it pertains to JRuby (we do not use the code in question) but
our inclusion of the library continues to get flagged by auditing
tools.

This commit starts the process of moving to the successor library,
SnakeYAML Engine. The parser API is largely unchanged, except as
seen in this commit. No Java exceptions are thrown, but a number
of Psych tests fail (possibly due to Engine being YAML 1.2 only).
2023-01-31 13:14:05 +09:00
Nobuyoshi Nakada
4bc343b436 Extract check for RSTRING_SOCKLEN 2023-01-30 21:55:37 +09:00
Nobuyoshi Nakada
21dced8b01 [ruby/stringio] [Bug #19389] Fix chomping with longer separator
eb322a9716
2023-01-28 13:00:08 +00:00
Khem Raj
f49bb1505b
[ruby/fiddle] fiddle: Use C11 _Alignof to define ALIGN_OF when
possible
(https://github.com/ruby/fiddle/pull/120)

WG14 N2350 made very clear that it is an UB having type definitions
within "offsetof" [1]. This patch enhances the implementation of macro
ALIGN_OF to use builtin "_Alignof" to avoid undefined behavior when
using std=c11 or newer

clang 16+ has started to flag this [2]

Fixes build when using -std >= gnu11 and using clang16+

Older compilers gcc < 4.9 or clang < 8 has buggy _Alignof even though it
may support C11, exclude those compiler versions

[1] https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2350.htm
[2] https://reviews.llvm.org/D133574

Signed-off-by: Khem Raj <raj.khem@gmail.com>

ad6c9aa826
2023-01-27 11:30:13 +09:00
Aaron Patterson
f4609b6bc4
[ruby/fiddle] Fix comment formatting
36b2432575
2023-01-27 11:30:13 +09:00
Aaron Patterson
1df7f359d1
[ruby/fiddle] Update documentation
(https://github.com/ruby/fiddle/pull/119)

The documentation for `Fiddle.dlwrap` and `Fiddle.dlunwrap` were not
very accurate and pretty confusing. This commit updates the
documentation so it's easier to understand what the methods do.
2023-01-27 11:30:13 +09:00
Yusuke Nakamura
a22ed3e99d
Fix homepage url in gemspec
GitHub Pages now hosted on *.github.io
2023-01-23 17:06:15 +09:00
Jean Boussier
8fded5f5d1 [ruby/psych] Fix RestrictedYAMLTree allowing the Symbol class should allow all symbols
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.

592a75a656
2023-01-23 02:07:23 +00:00
Hiroshi SHIBATA
8a771efec2 [ruby/psych] Bump up 5.0.2
a170b8eb46
2023-01-18 04:53:12 +00:00
Kazuhiro NISHIYAMA
8ae4e3ddc9
Clean up removed directories in ext/Setup* [ci skip] 2023-01-18 12:02:27 +09:00
Kazuhiro NISHIYAMA
2fa3fda0c4
Remove removed files from ext/.document [ci skip]
- dbm/dbm.c removed at 55cd3e4ebf
- fiber/fiber.c removed at 521ad9a13a
- gdbm/gdbm.c removed at edcc29dcff
2023-01-18 11:57:00 +09:00
Hiroshi SHIBATA
492d37fbbd [ruby/psych] Bump up 5.0.2.pre1 for testing
67ec299c68
2023-01-17 08:46:27 +00:00
Hiroshi SHIBATA
dd510da89a [ruby/psych] configure of libyaml couldn't detect "arm64-apple-darwin22" for build host.
checking whether make sets $(MAKE)... (cached) yes
  checking build system type... arm-apple-darwin21.6.0
  checking host system type... Invalid configuration `arm64-apple-darwin21': machine `arm64-apple' not recognized
  configure: error: /bin/sh /Users/hsbt/Downloads/yaml-0.2.5/config/config.sub arm64-apple-darwin21 failed
  *** extconf.rb failed ***

ad1502202c
2023-01-17 08:26:22 +00:00
Rick Hull
4617b40f8b fix typo in comments / autodoc
replace _socktype_ with _type_ in the comments
2023-01-16 08:00:03 +09:00
Charles Oliver Nutter
2082ba7c69 [ruby/psych] Remove deleted file from gemspec
77861ff281
2023-01-14 01:24:39 +00:00
Benoit Daloze
6abe20e87b Remove Encoding#replicate 2023-01-11 13:41:41 +01:00
Jean Boussier
3161fd4372 [ruby/psych] Get rid of anonymous eval calls
Things declared in anonymous eval are always annoying to locate.

38871ad4e5
2023-01-11 10:08:13 +00:00
Nobuyoshi Nakada
0a2bf5f1e2 [ruby/zlib] Check for functions with arguments and the header
With arguments, mkmf skips compilation check for the function as RHS.

9ed9d6d36e
2023-01-09 10:46:02 +00:00
Lars Kanis
f6952a94eb [ruby/psych] Fix wrong package name of MSYS2/MINGW dependency
There is no package called "libyaml-devel". "libyaml" is enough.
2023-01-09 09:39:08 +00:00
Nobuyoshi Nakada
69a2687a27 [ruby/bigdecimal] Fix format specifiers for size_t
99db3c9754
2023-01-07 03:15:27 +00:00
Nobuyoshi Nakada
dcf63b58cf [ruby/psych] Strip trailing spaces [ci skip]
e07b16ad8b
2023-01-06 06:37:01 +00:00
dsisnero
f877805a0c [ruby/psych] Add msys2 dependencies for windows
9a3816d903
2023-01-06 06:33:08 +00:00
Peter Zhu
2056c0a7c6 Add embedded status to dumps of T_OBJECT
This commit adds `"embedded":true` in ObjectSpace.dump for T_OBJECTs
that are embedded.
2023-01-05 16:00:36 -05:00
Peter Zhu
b8a3f1bd45 Fix crash in tracing object allocations
ObjectSpace.trace_object_allocations_start could crash since it adds a
TracePoint for when objects are freed. However, TracePoint could crash
since it modifies st tables while inside the GC that is trying to free
the object. This could cause a memory allocation to happen which would
crash if it triggers another GC.

See a crash log: http://ci.rvm.jp/results/trunk@ruby-sp1/4373707
2023-01-04 09:10:58 -05:00
Nobuyoshi Nakada
f527a0911d
[DOC] [Bug #19290] fix formatting 2023-01-01 14:50:39 +09:00
Kevin Murphy
b3d330c39e
Coverage.supported? recognizes oneshot_lines mode (#7040)
This adds oneshot_lines as a mode of coverage that is supported.
2022-12-29 21:23:25 +13:00
Marco Costa
5e54c57d83 [DOC] Surface existing MonitorMixin documentation 2022-12-26 17:40:11 +09:00
Sutou Kouhei
10c9ce9d4c bump up to 3.0.5 2022-12-26 15:09:21 +09:00
Sutou Kouhei
79ad045214 [ruby/strscan] Bump version
3ada12613d
2022-12-26 15:09:21 +09:00
Mau Magnaguagno
8df574a492 [ruby/fiddle] Prefer String#unpack1 in Fiddle::ValueUtil
(https://github.com/ruby/fiddle/pull/118)

String#unpack1 is available since Ruby 2.4, and support for older than
Ruby 2.5 was dropped by #85.
Also simplified a common return statement.
2022-12-26 15:09:21 +09:00
Sutou Kouhei
1dc8c18b72 [ruby/fiddle] Bump version
3033266902
2022-12-26 15:09:21 +09:00
Hiroshi SHIBATA
cd6c7613f3
Apply the accidental commits again before Ruby 3.2.
Reverts the following commits:

  eb8d4d7b51
  edb83dc3a2
  d40064d184
2022-12-26 12:07:42 +09:00
Hiroshi SHIBATA
edb83dc3a2
Revert the additional change from openssl-3.1.0
Revert "[ruby/openssl] pkey/ec: constify"

  This reverts commit d2cd903c85.
2022-12-23 19:37:24 +09:00
Nobuyoshi Nakada
d2cd903c85 [ruby/openssl] pkey/ec: constify
6fb3499a7b
2022-12-23 11:42:15 +09:00
Hiroshi SHIBATA
3ade713967
Bump version to 1.6.2 2022-12-23 09:51:52 +09:00
Hiroshi SHIBATA
ba34208800
Bump up Racc parser version 2022-12-23 09:51:35 +09:00
Johnny Willemsen
6438f3cad6 [ruby/racc] Removed old originalId in comment
1dfbef8e99
2022-12-23 09:46:59 +09:00
Kazuki Yamaguchi
2d2baaf2f4 [ruby/openssl] Ruby/OpenSSL 3.1.0
c2f7d775c6
2022-12-23 09:39:15 +09:00
Kazuki Yamaguchi
a778305919 [ruby/openssl] Ruby/OpenSSL 3.0.2
48b79333e0
2022-12-23 09:39:15 +09:00
Kazuki Yamaguchi
046aadb89b [ruby/openssl] Ruby/OpenSSL 2.2.3
04acccd692
2022-12-23 09:39:15 +09:00
Joe Truba
0e11d2c3f8 [ruby/openssl] pkey/ec: check private key validity with OpenSSL 3
The behavior of EVP_PKEY_public_check changed between OpenSSL 1.1.1
and 3.0 so that it no longer validates the private key. Instead, private
keys can be validated through EVP_PKEY_private_check and
EVP_PKEY_pairwise_check.

[ky: simplified condition to use either EVP_PKEY_check() or
EVP_PKEY_public_check().]

e38a63ab3d
2022-12-23 09:39:15 +09:00