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

75908 Коммитов

Автор SHA1 Сообщение Дата
Peter Zhu c4cc3be195 Remove dead code in shapes.c and shapes.h 2023-01-30 14:55:20 -05:00
Takashi Kokubun 2e0f3b5546
YJIT: Fix BorrowMutError on GC.compact (#7176)
YJIT: Fix BorrowMutError
2023-01-30 11:16:33 -08:00
Takashi Kokubun bc0dc9d40e
YJIT: Skip defer_compilation for fixnums if possible (#7168)
* YJIT: Skip defer_compilation for fixnums if possible

* YJIT: It should be Some(false)

* YJIT: Define two_fixnums_on_stack on Context
2023-01-30 13:55:00 -05:00
Alan Wu e1ffafb285
YJIT: Inline return address callback (#7198)
This makes it so that the generator and the output code read in the same
order. I think it reads better this way.
2023-01-30 12:50:08 -05:00
Mat Sadler cb06006213 [rubygems/rubygems] normalise manifest path from cargo on windows
https://github.com/rubygems/rubygems/commit/23b5ca5fc4
2023-01-30 17:39:48 +00:00
Mat Sadler c5a34f5b56 [rubygems/rubygems] better error message if cargo metadata doesn't contain the package we expect
https://github.com/rubygems/rubygems/commit/cb7e6d1577
2023-01-30 17:39:48 +00:00
Mat Sadler b4defea362 [rubygems/rubygems] install rust extensions into expected directory nesting
https://github.com/rubygems/rubygems/commit/85ea86d348
2023-01-30 17:39:47 +00:00
Mat Sadler ca951f6719 [rubygems/rubygems] use cargo to get crate name
the final copying of the extension into place has been slimmed
down, reflecting that it only needs to copy a single file, rather
than replicating the more involved process used for a C ext

this also refactors #build so that #cargo_crate_name only needs
to be called once, and hopefully the build flow is easier to
understand

https://github.com/rubygems/rubygems/commit/5a0d7f2e6c
2023-01-30 17:39:47 +00:00
Mat Sadler 00e1ee4a7e [rubygems/rubygems] don't force Cargo.lock to be in gem root
https://github.com/rubygems/rubygems/commit/371044c0ab
2023-01-30 17:39:46 +00:00
Mat Sadler 0c2b43462f [rubygems/rubygems] remove unused files in cargo builder test fixtures
https://github.com/rubygems/rubygems/commit/233847513b
2023-01-30 17:39:46 +00:00
Jeremy Evans eccfc978fd Fix parsing of regexps that toggle extended mode on/off inside regexp
This was broken in ec3542229b. That commit
didn't handle cases where extended mode was turned on/off inside the
regexp.  There are two ways to turn extended mode on/off:

```
/(?-x:#y)#z
/x =~ '#y'

/(?-x)#y(?x)#z
/x =~ '#y'
```

These can be nested inside the same regexp:

```
/(?-x:(?x)#x
(?-x)#y)#z
/x =~ '#y'
```

As you can probably imagine, this makes handling these regexps
somewhat complex. Due to the nesting inside portions of regexps,
the unassign_nonascii function needs to be recursive.  In
recursive mode, it needs to track both opening and closing
parentheses, similar to how it already tracked opening and
closing brackets for character classes.

When scanning the regexp and coming to `(?` not followed by `#`,
scan for options, and use `x` and `i` to determine whether to
turn on or off extended mode.  For `:`, indicting only the
current regexp section should have the extended mode
switched, recurse with the extended mode set or unset. For `)`,
indicating the remainder of the regexp (or current regexp portion
if already recursing) should turn extended mode on or off, just
change the extended mode flag and keep scanning.

While testing this, I noticed that `a`, `d`, and `u` are accepted
as options, in addition to `i`, `m`, and `x`, but I can't see
where those options are documented.  I'm not sure whether or not
handling  `a`, `d`, and `u` as options is a bug.

Fixes [Bug #19379]
2023-01-30 08:51:12 -08:00
Jean Boussier 3f54d09a5b bignum.c: rb_int_parse_cstr handle `0` strings
[Bug #19390]

We shouldn't check the string length when skipping zeros, as the
string might only contains zero characters, resulting in an empty string.
2023-01-30 14:42:40 +01:00
Nobuyoshi Nakada 4bc343b436 Extract check for RSTRING_SOCKLEN 2023-01-30 21:55:37 +09:00
git 1c7bf378a1 Update default gems list at b432867429 [ci skip] 2023-01-30 08:29:31 +00:00
Hiroshi SHIBATA b432867429
Skip OpenSSL::TestHMAC#test_dup when running with RHEL9 2023-01-30 16:55:14 +09:00
Luke Gruber 4ffef59bb1
[DOC] Make changes to docs in ractor.rb (#7180)
* Make changes to docs in ractor.rb

Mainly English changes to make things more clear, and to fix minor
non-idiomatic phrases. Also clarified difference between frozen and
shareable objects.

* More minor changes to Ractor docs.
2023-01-29 10:01:49 +09:00
BurdetteLamar 8250b46794 [ruby/net-http] Correct doc error
https://github.com/ruby/net-http/commit/dc006d8419
2023-01-28 21:41:15 +00:00
Nobuyoshi Nakada 21dced8b01 [ruby/stringio] [Bug #19389] Fix chomping with longer separator
https://github.com/ruby/stringio/commit/eb322a9716
2023-01-28 13:00:08 +00:00
Daniel Colson 8429134d0d [rubygems/rubygems] Don't warn on bundler binstubs --standalone --all
Prior to this commit `bundle binstubs --standalone --all` would output a
warning about not being able to generate a standalone binstub for
bundler.

This warning predates the `--all` option, and I don't think it makes
sense in this context. The warning makes good sense when explicitly
trying to generate a bundler standalone binstub with `bundle binstubs
bundler --standalone`, since that command won't do what the user might
have expected. But `--all` is not specifically asking for bundler, and
having it report each time that the bundler binstubs could not be
generated does not seem particularly helpful. The only way to make that
warning go away would be to stop using `--standalone --all`.

This commit skips the warning when running with the `--all` option.

https://github.com/rubygems/rubygems/commit/e6a72e19eb
2023-01-27 21:06:39 +00:00
Alan Wu 7d4395cb69 YJIT: Fix shared/static library symbol leaks
Rust 1.58.0 unfortunately doesn't provide facilities to control symbol
visibility/presence, but we care about controlling the list of
symbols exported from libruby-static.a and libruby.so.

This commit uses `ld -r` to make a single object out of rustc's
staticlib output, libyjit.a. This moves libyjit.a out of MAINLIBS and adds
libyjit.o into COMMONOBJS, which obviates the code for merging libyjit.a
into libruby-static.a. The odd appearance of libyjit.a in SOLIBS is also
gone.

To filter out symbols we do not want to export on ELF platforms, we use
objcopy after the partial link. On darwin, we supply a symbol list to
the linker which takes care of hiding unprefixed symbols.

[Bug #19255]

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2023-01-27 12:28:09 -05:00
Alan Wu e7e48e8a66 configure: Keep OBJCOPY even when visibility options are available
YJIT will need it to address symbol leakage issue. Fallback to `:` when
OBJCOPY is not available on the system.

Co-authored-by: Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2023-01-27 12:28:09 -05:00
Alan Wu 17c8bf2c63 configure: Don't use use LD=clang, ld takes different flags
This was a difference from using a GNU toolchain previously. It wasn't a
problem because we don't invoke $(LD) in the Makefile currently. YJIT
will want to invoke LD, so needs this consistency.
2023-01-27 12:28:09 -05:00
Benoit Daloze 47b66a5acd [ruby/bigdecimal] Add truffleruby in CI
https://github.com/ruby/bigdecimal/commit/5a25e26e08
2023-01-27 11:07:06 +00:00
Samuel Giddins 71256caf7f [rubygems/rubygems] Update the list of SPDX licence identifiers
https://github.com/rubygems/rubygems/commit/18a9b0dc7e
2023-01-27 11:31:41 +09:00
Nobuyoshi Nakada 06e30df408 [ruby/syntax_suggest] Hide internal document and detail of `Kernel` monkey patching
https://bugs.ruby-lang.org/issues/19285

https://github.com/ruby/syntax_suggest/commit/25ca82f8f9
2023-01-27 11:31:10 +09: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>

https://github.com/ruby/fiddle/commit/ad6c9aa826
2023-01-27 11:30:13 +09:00
Aaron Patterson f4609b6bc4
[ruby/fiddle] Fix comment formatting
https://github.com/ruby/fiddle/commit/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
Hiroshi SHIBATA 967dec5d61
[ruby/openssl] Added CoreAssertions
https://github.com/ruby/openssl/commit/520601e11d

  This commits swtich to use ruby/ruby's envutil.rb instead of
  vendored in openssl repo.
2023-01-27 11:30:13 +09:00
Andrew Konchin 5afc830130
[ruby/openssl] Do not require test file in a forked process in tests
https://github.com/ruby/openssl/commit/ae784673d7
2023-01-27 11:30:13 +09:00
Samuel Williams 1b06cd3f09
Pass through `line_offset` argument correctly (but it was always 0). (#7177) 2023-01-27 14:49:26 +13:00
Samuel Giddins 70829928cb [rubygems/rubygems] Deprecate Gem::List
It is unused, we will remove it in the next major version

https://github.com/rubygems/rubygems/commit/c3f6c27d6d
2023-01-26 21:41:48 +00:00
Aaron Patterson 88f2b94065
Revert "Limit maximum number of IVs on a shape"
This reverts commit 78fcc9847a.
2023-01-26 11:04:55 -05:00
Nobuyoshi Nakada 6422fef90c Fix `target_cpu` at runtime 2023-01-26 16:31:08 +09:00
Nobuyoshi Nakada 9794e49c88 Link RUBYSPEC_CAPIEXT against the built library 2023-01-26 16:31:08 +09:00
Nobuyoshi Nakada 00ee1d128f Get rid of duplicate "--disable=gems" options 2023-01-26 16:31:08 +09:00
Hiroshi SHIBATA 545ade21a2 Enable code-coverage result for test-spec 2023-01-26 15:32:29 +09:00
Hiroshi SHIBATA 2d98127131
Filter spec directory for code coverage 2023-01-26 14:05:01 +09:00
Hiroshi SHIBATA 6608d47bed Enable code-coverage result for test-syntax-suggest 2023-01-26 13:52:20 +09:00
Hiroshi SHIBATA 069b6f88e2 Ignore all of tool directory from code coverage, It contains tool/test and etc. 2023-01-26 13:52:20 +09:00
Hiroshi SHIBATA 8662d70a8b Ignore vendored libraries by rubygems from code coverage 2023-01-26 13:52:20 +09:00
Hiroshi SHIBATA 98e84f3f7a filter coverage result with vendored libraries and test code 2023-01-26 13:52:20 +09:00
Hiroshi SHIBATA eb2670e32d [ruby/reline] Revert "correct Win32API capitalization for JRuby"
This reverts commit https://github.com/ruby/reline/commit/d6e7c9e1d9af.

https://github.com/ruby/reline/commit/c47a5b684c
2023-01-26 04:27:52 +00:00
Nobuyoshi Nakada be6a347ace Need gemspec files instead of cloned directories 2023-01-26 12:50:39 +09:00
Hiroshi SHIBATA 7eef4547b1 Fixed clone name 2023-01-26 12:50:39 +09:00
Nobuyoshi Nakada 7a4f7fc14d Use timestamp files to track test revision of bundled gems 2023-01-26 12:50:39 +09:00
Nobuyoshi Nakada 17f5631c6e [Bug #19340] Fix bundle gems with test revision
Build temporary gem package from cloned repository if test revision is
set.
2023-01-26 12:50:39 +09:00
Jemma Issroff 78fcc9847a Limit maximum number of IVs on a shape
Create SHAPE_MAX_NUM_IVS (currently 50) and limit all shapes to that
number of IVs. When a shape has more than 50 IVs, fallback to the
obj_too_complex shape which uses hash lookup for ivs.
2023-01-25 14:48:28 -05:00
Hiroshi SHIBATA 5e1e5af2e7
Support simplecov-0.22.0.
simplecov-0.22.0 no longer support pre-0.18 result format. result data needs
  `lines` key for coverage data.
2023-01-25 16:47:05 +09:00
yui-knk e82cef1762 Remove not used argument from tokenize_ident
This has not been used since 5e59be3edd
2023-01-25 10:52:37 +09:00