79677 Commits

Author SHA1 Message Date
HParker
f84690c6e2 [ruby/yarp] ignore state on embexpr_end
Ripper state can carry over from the previous node type making coparison less useful

https://github.com/ruby/yarp/commit/74509728d4
2023-08-25 19:11:14 +00:00
Takashi Kokubun
4825600da5 Update NEWS.md for YJIT [ci skip]
Reverse-merge Maxime's release notes changes to NEWS.md and added a
couple of things that are not in release notes.
2023-08-25 12:00:54 -07:00
Mike Dalessio
3525c460f9 [ruby/yarp] fix: regexes and strings with escaped newline around a heredoc
Found via the fuzzer.

https://github.com/ruby/yarp/commit/501757135a

Co-authored-by: Kevin Newton <kddnewton@gmail.com>
2023-08-25 18:20:49 +00:00
Jemma Issroff
bf3d48e182 [ruby/yarp] Allow whitespace after "(en)coding" before ":", as in "encoding :"
https://github.com/ruby/yarp/commit/d39a998182
2023-08-25 18:19:08 +00:00
Nobuyoshi Nakada
7d32011399 [Bug #19852] Use gem name without suffix 2023-08-26 02:47:04 +09:00
Nobuyoshi Nakada
40efbc7e40 [Bug #19851] Ripper: Hide internal block argument ID 2023-08-26 02:08:53 +09:00
Kevin Newton
61c5c2f1c8 [ruby/yarp] Add names to classes and modules
This should hopefully make it easier to compile these nodes, and
also for static analysis tools for having a quick label.

https://github.com/ruby/yarp/commit/f086662144
2023-08-25 17:02:38 +00:00
Nobuyoshi Nakada
fe73f9f24b
Replace only use of snprintf in parser 2023-08-25 23:34:02 +09:00
Peter Zhu
f5c8bdaa8a Implement WeakKeyMap using weak references 2023-08-25 09:01:21 -04:00
Peter Zhu
ee9cc8e32e Implement WeakMap using weak references 2023-08-25 09:01:21 -04:00
Peter Zhu
2091bf9493 Expose stats about weak references
[Feature #19783]

This commit adds stats about weak references to `GC.latest_gc_info`.
It adds the following two keys:

- `weak_references_count`: number of weak references registered during
  the last GC.
- `retained_weak_references_count`: number of weak references that
  survived the last GC.
2023-08-25 09:01:21 -04:00
Peter Zhu
bfb395c620 Implement weak references in the GC
[Feature #19783]

This commit adds support for weak references in the GC through the
function `rb_gc_mark_weak`. Unlike strong references, weak references
does not mark the object, but rather lets the GC know that an object
refers to another one. If the child object is freed, the pointer from
the parent object is overwritten with `Qundef`.

Co-Authored-By: Jean Boussier <byroot@ruby-lang.org>
2023-08-25 09:01:21 -04:00
Peter Zhu
633243958c Add _without_gc functions to darray
These functions manipulate darray without the possibility of triggering
GC, which is used for places that cannot trigger GC. These functions
crash when the allocation fails.
2023-08-25 09:01:21 -04:00
Kevin Newton
7002d44c10
Fix merge conflict in lib/yarp/lex_compat.rb 2023-08-25 09:00:04 -04:00
Kevin Newton
ec7a2fdc03 [ruby/yarp] Fix up lex compat on Ruby HEAD
https://github.com/ruby/yarp/commit/7710cee248
2023-08-25 12:49:37 +00:00
Mike Dalessio
b8cab92a3f [ruby/yarp] fix: unterminated regular expression with a heredoc
Previously this snippet would track the same newline twice, leading to
a failed assertion in yp_newline_list_append.

https://github.com/ruby/yarp/commit/1d3fe19a94
2023-08-25 12:39:13 +00:00
Kevin Newton
90103f5d18 [ruby/yarp] Add the ability to serialize shared strings
https://github.com/ruby/yarp/commit/8d18c7ae29
2023-08-25 12:38:35 +00:00
Nobuyoshi Nakada
fe8f6dfed1 Remove yarp hack for BOM 2023-08-25 20:07:10 +09:00
Nobuyoshi Nakada
1f76e42b85 [Bug #19848] Flush BOM
The token just after BOM needs to position at column 0, so that the
indentation matches closing line.
2023-08-25 20:07:10 +09:00
David Rodríguez
023b8ddd22
[rubygems/rubygems] Don't use full indexes unnecessarily on legacy Gemfiles
On legacy Gemfiles with multiple remote sources, where all of them
support the compact index API, we were still falling back to full
indexes.

Fixing this also allows to simplifying the code.

https://github.com/rubygems/rubygems/commit/b1357c8e72
2023-08-25 18:34:47 +09:00
Jun Aruga
b5d0374635
[ruby/openssl] Fix LIBRESSL_VERSION_NUMBER document mistake.
* Fix the wrong man reference.
* According to the LIBRESSL_VERSION_NUMBER(3), the value always ends with 00f.

```
$ man -M /home/jaruga/.local/libressl-6650dce/share/man/ 3 LIBRESSL_VERSION_NUMBER
...
DESCRIPTION
     OPENSSL_VERSION_NUMBER and LIBRESSL_VERSION_NUMBER are numeric release version
     identifiers.  The first two digits contain the major release number, the third and
     fourth digits the minor release number, and the fifth and sixth digits the fix re‐
     lease number.  For OpenSSL, the seventh and eight digits contain the patch release
     number and the final digit is 0 for development, 1 to e for betas 1 to 14, or f
     for release.  For LibreSSL, OPENSSL_VERSION_NUMBER is always 0x020000000, and
     LIBRESSL_VERSION_NUMBER always ends with 00f.
```

https://github.com/ruby/openssl/commit/296c859d18
2023-08-25 18:34:47 +09:00
Nobuyoshi Nakada
503f98ebd3 Remove SCRIPT_LINES__ related member functions 2023-08-25 18:23:05 +09:00
Nobuyoshi Nakada
6aa16f9ec1 Move SCRIPT_LINES__ away from parse.y 2023-08-25 18:23:05 +09:00
卜部昌平
d9cba2fc74 include missing header 2023-08-25 17:27:53 +09:00
卜部昌平
a736420ce5 define back snprintf 2023-08-25 17:27:53 +09:00
卜部昌平
26cb3b5617 config.h has to be the very beginning
This header defines several essential macros.
2023-08-25 17:27:53 +09:00
卜部昌平
140daab5ac #include <stdarg.h> for va_list 2023-08-25 17:27:53 +09:00
卜部昌平
fa327472ca snprintf could be defined
include/ruby/subst.h has `#define snprintf` which breaks here.
2023-08-25 17:27:53 +09:00
卜部昌平
1614e5ebb2 C structs cannot have two definitions
Not allowed even the definitions are identical.
2023-08-25 17:27:53 +09:00
卜部昌平
81620ed9b5 needless duplicated typedef deleted 2023-08-25 17:27:53 +09:00
卜部昌平
ddc5c204b2 VALUE is already defined
This header is needed only when outside of the project
2023-08-25 17:27:53 +09:00
卜部昌平
197e91f357 build matrix for universal parser 2023-08-25 17:27:53 +09:00
卜部昌平
12ec1fb2b1 use configure-detected sanity of _Alignof
This is actually already checked in (Ruby's) configure.
2023-08-25 17:27:53 +09:00
卜部昌平
fa54406f50 empty initializer is a C++ ism
C99 does not allow this syntax.
2023-08-25 17:27:53 +09:00
卜部昌平
eec85a6309 tool/update-deps --fix 2023-08-25 17:27:53 +09:00
卜部昌平
097b766b41 do not redefine a typedef
duplicated typedef declaration was not allowed in C99.
2023-08-25 17:27:53 +09:00
卜部昌平
c914382db2 do not redefine a typedef
duplicated typedef declaration was not allowed in C99.
2023-08-25 17:27:53 +09:00
卜部昌平
fa2712981f workaround clang-17 -Wc2x-extensions
cf: 874217f99b
2023-08-25 17:27:53 +09:00
卜部昌平
b88bdf1ebb direct use of CFLAGS
Autoconf 2.71's `AC_PROG_CC` nukes `CC` variable, which we don't
want.  For instance a user could specify `--with-gcc="gcc -std=c99"`
to _force_ C99 mode; but `AC_PROG_CC` just nulifies that `-std=c99`
part.

`AC_PROG_CC` is called everywhere from inside of autoconf itself via
`AC_REQUIRE([AC_PROG_CC])`.  It is not a wise idea to try avoiding
this macro at all.  We need to reroute `-std=` flags to somewhere
else.
2023-08-25 17:27:53 +09:00
卜部昌平
eb57b6ba82 [CI]: LLVM 18 begun 2023-08-25 17:27:53 +09:00
Nobuyoshi Nakada
5b407450f5
Skip push by dependabot [ci skip]
Would be pull-requested soon.
2023-08-25 17:10:45 +09:00
Hiroshi SHIBATA
f7359e112a
Suggest to add bundled gems into gemspec if 3rd party gem try to load gem from Gem::BUNDLED_GEMS::SINCE
[Feature #19846]
2023-08-25 15:57:53 +09:00
Hiroshi SHIBATA
70272ca65c
Warn for bigdecimal.so case too 2023-08-25 13:11:06 +09:00
Hiroshi SHIBATA
3a70afad32
prime is bundled gems since Ruby 3.1.0. We should warn it under the bundler environment 2023-08-25 12:56:47 +09:00
Hiroshi SHIBATA
28b2cb10d5
We should also warn when loading 'bigdecimal/*' libraries 2023-08-25 12:52:10 +09:00
Hiroshi SHIBATA
bdd535eac6
Decorate Hash syntax for Gem::BUNDLED_GEMS::EXACT 2023-08-25 12:52:10 +09:00
Jeremy Evans
b635388a90 Check that __builtin_mul_overflow can handle long long
Fixes [Bug #17646]

Patch from xtkoba (Tee KOBAYASHI)
2023-08-24 20:47:23 -07:00
dependabot[bot]
945e79c996 Bump actions/checkout from 3.5.3 to 3.6.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.3 to 3.6.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](c85c95e3d7...f43a0e5ff2)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-25 12:08:51 +09:00
Peter Zhu
eb5eeb6f19 [DOC] Fix link in NEWS.md
I forgot to commit the second part in
775df74feb597555f0944ace2d59d10a24d4421e.
2023-08-24 21:48:04 -04:00
Takashi Kokubun
6f1dfa7411
Resurrect srcs dependency for YARP templates (#8285) 2023-08-24 18:46:06 -07:00