89694 Commits

Author SHA1 Message Date
Hiroshi SHIBATA
9bbcbc3f36 glibc and musl didn't provide A1-A7, FP and S3-S8 constants.
* https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/loongarch/sys/ucontext.h
* https://git.musl-libc.org/cgit/musl/tree/arch/loongarch64/bits/signal.h
2025-01-07 08:00:22 +09:00
Earlopain
89c505dc47 Move string escape sequence documention further down
If someone looks at documention for strings,
I don't think escape sequences is what they look
for in majority of the cases.
2025-01-07 07:56:48 +09:00
Earlopain
b0d291ec83 Fix link to strings in literals.rdoc
Since 5e1001f754, the string link is broken

Instead of changing the anchor reference, I changed the header directly,
to keep in line with other titles
2025-01-07 07:56:48 +09:00
ydah
b3de2c334e Use ISEQ_BODY(iseq) instead of iseq->body
trivial change that unifies the format for access.
2025-01-07 07:18:49 +09:00
ydah
de8deb5f9c Remove unused token definitions for tRPAREN in Ripper and parser files 2025-01-07 07:17:55 +09:00
tomoya ishida
8fb17f86d7
[Bug #21006] Fix defined_expr compilation of method call with parenth… (#12518)
[Bug #21006] Fix defined_expr compilation of method call with parenthesized receiver
2025-01-07 05:06:02 +09:00
Mari Imaizumi
5698f4f2e1 [ruby/reline] Enter newline if cursor position is middle of input
(https://github.com/ruby/reline/pull/802)

* Enter newline if cursor position is middle of input

* Add ed_force_submit to allow input confirmation on non-final lines

https://github.com/ruby/reline/commit/8ef534e904
2025-01-06 19:21:09 +00:00
Kevin Newton
31905d9e23 Allow escaping from ensures through next
Fixes [Bug #21001]
2025-01-06 13:18:22 -05:00
Kazuki Yamaguchi
a61c16ba42 [ruby/openssl] pkey: simplify X25519/Ed25519 test cases
When these test cases were written, we did not know the exact OpenSSL
and LibreSSL version number in which they would be implemented. Now that
we know it, we can use that information to ensure the tests are run
whenever they should be.

 - OpenSSL 1.1.0 added X25519 support
 - OpenSSL 1.1.1 added Ed25519 support and
   EVP_PKEY_new_raw_private_key()
 - LibreSSL 3.7.0 added X25519 and Ed25519 support in EVP_PKEY and
   EVP_PKEY_new_raw_private_key()
 - LibreSSL 3.8.1 allowed ASN1_item_sign() to use Ed25519

https://github.com/ruby/openssl/commit/6cb6663c91
2025-01-06 17:07:57 +00:00
Kazuki Yamaguchi
3da850104e [ruby/openssl] pkey: fix test case for new_raw_*key
Method names must start with "test_" to run.

https://github.com/ruby/openssl/commit/fed9d09b76
2025-01-06 17:07:57 +00:00
Kazuki Yamaguchi
ff708f86fa [ruby/openssl] pkey/ec: use heredoc for invalid key example in test cases
test/openssl/fixtures/pkey/p256_too_large.pem and p384_invalid.pem are
invalid keys where the encoded public key doesn't match the private key.
They are only useful for test cases for OpenSSL::PKey::EC#check_key and
will not be reused elsewhere. Let's directly include the PEM encoding
as a heredoc for clarity.

p384_invalid.pem is dropped because it is redundant.

https://github.com/ruby/openssl/commit/2f807ff30f
2025-01-06 17:07:56 +00:00
Kazuki Yamaguchi
f0095413a5 [ruby/openssl] x509cert: simplify test cases for Certificate.load_file
Remove files from test/openssl/fixtures/pkey/ which are not pkeys.
The test cases for OpenSSL::X509::Certificate.load_file can simply use
issue_cert and Tempfile.

https://github.com/ruby/openssl/commit/11216b8bec
2025-01-06 17:07:56 +00:00
samuel40791765
5412501e36 [ruby/openssl] pkey: Use openssl generated pkcs8 key instead
https://github.com/ruby/openssl/commit/6a6fac9958
2025-01-06 14:04:58 +00:00
S-H-GAMELINKS
975461bf88 Remove SYM2ID for Parser
Ruby Parser not used SYM2ID.
And sym2id property can be removed from Universal Parser.
2025-01-06 20:17:47 +09:00
Naoto Ono
e0591b666f
Launchable: Exit 0 not to stop CI pipeline (#12449) 2025-01-06 05:49:58 -05:00
Hiroshi SHIBATA
54bd5e036e Try to update the latest version of vcpkg 2025-01-06 18:39:24 +09:00
Hiroshi SHIBATA
49d8384e14 Update vcpkg baseline with latest version
```
    libffi:x64-windows@3.4.6
    libyaml:x64-windows@0.2.5#5
    openssl:x64-windows@3.4.0
  * vcpkg-cmake:x64-windows@2024-04-23
  * vcpkg-cmake-config:x64-windows@2024-05-23
  * vcpkg-cmake-get-vars:x64-windows@2024-09-22
    zlib:x64-windows@1.3.1
```
2025-01-06 18:39:24 +09:00
Hiroshi SHIBATA
668701cb0b
Added copyright for vendored turbo_tests.
[Bug #21002]
2025-01-06 18:11:38 +09:00
License Update
70decc857c [rubygems/rubygems] Update SPDX license list as of 2024-12-30
https://github.com/rubygems/rubygems/commit/42aaaff15c
2025-01-06 07:19:23 +00:00
Raul Gutierrez Segales
7ec233c85b Fix typo for private constant in Socket
Signed-off-by: Raul Gutierrez Segales <rgs@itevenworks.net>
2025-01-06 15:41:49 +09:00
Junichi Ito
c8e3d745fa Use a single quote instead of a backtick for error messages
Fix https://bugs.ruby-lang.org/issues/20977
2025-01-05 20:50:53 -05:00
Mark Young
8a9f1e600f [ruby/logger] Provide a 'Changelog' link on rubygems.org/gems/logger
By providing a 'changelog_uri' in the metadata of the gemspec a
'Changelog' link will be shown on https://rubygems.org/gems/logger
which makes it quick and easy for someone to check on the changes
introduced with a new version.

Details of this functionality can be found on https://guides.rubygems.org/specification-reference/#metadata

https://github.com/ruby/logger/commit/c6c64b02a0
2025-01-06 01:20:56 +00:00
Mark Young
80b01cc567 [ruby/net-http] Provide a 'Changelog' link on rubygems.org/gems/net-http
By providing a 'changelog_uri' in the metadata of the gemspec a
'Changelog' link will be shown on https://rubygems.org/gems/net-http
which makes it quick and easy for someone to check on the changes
introduced with a new version.

Details of this functionality can be found on https://guides.rubygems.org/specification-reference/#metadata

https://github.com/ruby/net-http/commit/eeb728fefe
2025-01-06 01:19:55 +00:00
Mark Young
ce09b43aa0 [ruby/ostruct] Provide a 'Changelog' link on rubygems.org/gems/ostruct
By providing a 'changelog_uri' in the metadata of the gemspec a
'Changelog' link will be shown on https://rubygems.org/gems/ostruct
which makes it quick and easy for someone to check on the changes
introduced with a new version.

Details of this functionality can be found on https://guides.rubygems.org/specification-reference/#metadata

https://github.com/ruby/ostruct/commit/47d84001eb
2025-01-06 01:19:45 +00:00
Mark Young
3b659457b8 [ruby/securerandom] Provide a 'Changelog' link on rubygems.org/gems/securerandom
By providing a 'changelog_uri' in the metadata of the gemspec a
'Changelog' link will be shown on https://rubygems.org/gems/securerandom
which makes it quick and easy for someone to check on the changes
introduced with a new version.

Details of this functionality can be found on https://guides.rubygems.org/specification-reference/#metadata

https://github.com/ruby/securerandom/commit/3e0249deaf
2025-01-06 01:19:30 +00:00
git
e817d155be Update default gems list at 2a1cff40f5e7875f69a7d0ed59eab9 [ci skip] 2025-01-06 00:57:18 +00:00
Kevin Newton
2a1cff40f5 Do not warn unused block when using forwarding
Fixes [Bug #21003]
2025-01-05 19:56:21 -05:00
Earlopain
c037f5a28c [ruby/prism] Fix parser translator ast for heredoc with written newlines
Heredocs that contain "\\n" don't start a new string node.

https://github.com/ruby/prism/commit/61d9d3a15e
2025-01-05 18:12:44 +00:00
Kevin Newton
179e2cfa91 [ruby/prism] Fix global variable read off end
https://github.com/ruby/prism/commit/3f2c34b53d
2025-01-05 18:05:35 +00:00
Jean Boussier
22e9fa81ca gc/default/default.c: don't call malloc_usable_size when hint is present
Depending on the allocator, `malloc_usable_size` may be very cheap or quite
expensive. On `macOS` for instance, it's about as expensive as `malloc`.

In many case we call `objspace_malloc_size` with as size we initially
requested as `hint`. The real usable size may be a few bytes bigger,
but since we only use that data to feed GC heuristics, I don't think
it's very important to be perfectly accurate.

It would make sense to call `malloc_usable_size` after growing a String
or Array to use the extra capacity, but here we don't do that, so
the call isn't worth its cost.
2025-01-05 17:04:54 +01:00
Burdette Lamar
37361d87a6
[DOC] Tweaks for Hash.new (#12503) 2025-01-05 09:40:49 -05:00
Stan Lo
e45fca1372 [ruby/rdoc] [DOC] Remove unnecessary rdoc-ref missing example
(https://github.com/ruby/rdoc/pull/1271)

We don't actually need to link to the missing item to show the non-linked
result.

https://github.com/ruby/rdoc/commit/a7b7e8fc55
2025-01-05 12:41:53 +00:00
Stan Lo
9552bd590c
Sync IRB to 3e6c12b (#12486)
Sync IRB to 3e6c12b174c0a961d8065eae22f6c4afc7b2c3e8
2025-01-05 18:42:27 +09:00
tomoya ishida
a70206c439 [ruby/reline] Refactor utf-8 strings and invalid strings in test
code
(https://github.com/ruby/reline/pull/800)

* Remove invalid encoding string "\M-[char]" from test code, remove unused code/arg/options

* Omit unicode unnoralized input test in non-utf8 testcase

* Remove helper method and constant no longer used in testcode

* Change key binding test to use realistic bytes instead of invalid byte sequence

* Remove invalid byte sequence input from rendering test

yamatanooroti handles invalid byte sequence input "\M-[char]" and converts it to "\e[char]"
We don't need to use these invalid byte sequence and rely on the hack implemented in yamatanooroti

https://github.com/ruby/reline/commit/f09e7b154c
2025-01-05 06:57:25 +00:00
tomoya ishida
9a15672614 [ruby/reline] Fix bracketed paste and scrolling bug
(https://github.com/ruby/reline/pull/801)

* Fix set_pasting_state bug with bracketed paste

* Fix rendered cursor_y caching in case of rendering the screen without scroll_into_view

https://github.com/ruby/reline/commit/c5d5c444df
2025-01-05 04:57:23 +00:00
Peter Zhu
dfc9e978fb [Bug #21004] Fix memory leak with "it" in parse.y
Parsing `-> do it end` in parse.y leaks memory. We can see this in the
Valgrind output:

    56 bytes in 1 blocks are definitely lost in loss record 1 of 6
        at 0x484E0DC: calloc (vg_replace_malloc.c:1675)
        by 0x188970: calloc1 (default.c:1472)
        by 0x188970: rb_gc_impl_calloc (default.c:8208)
        by 0x188970: ruby_xcalloc_body (gc.c:4598)
        by 0x18B8BC: ruby_xcalloc (gc.c:4592)
        by 0x21DCCA70: new_locations_lambda_body (ripper.y:12844)
        by 0x21DCCA70: ripper_yyparse (ripper.y:5194)
        by 0x21DDA521: rb_ruby_ripper_parse0 (ripper.y:15798)
2025-01-05 09:06:12 +09:00
Peter Zhu
78d7dde21c Remove unused loc in rb_locations_lambda_body_t 2025-01-05 09:06:12 +09:00
Peter Zhu
9d7ba7848f Suppress warnings for flip-flop in test_ast.rb
There are warnings emitted from test_flip2_locations and test_flip3_locations.
This commit changes ast_parse to suppress all warnings.

    warning: integer literal in flip-flop
    warning: string literal in flip-flop
2025-01-04 17:53:33 -05:00
Alan Wu
c71addc522 YJIT: Fix crash when yielding keyword arguments
Previously, the code for dropping surplus arguments when yielding
into blocks erroneously attempted to drop keyword arguments when there
is in fact no surplus arguments. Fix the condition and test that
supplying the exact number of keyword arguments as require compiles
without fallback.
2025-01-04 12:53:20 -05:00
Nick Dower
37356b713c YJIT: Add crashing test for yielding keyword args
Code like the following is crashing for us on 3.4.1:

```ruby
def a(&) = yield(x: 0)

1000.times { a { |x:| x } }
```

Crash:

```
ruby: YJIT has panicked. More info to follow...
thread '<unnamed>' panicked at ./yjit/src/codegen.rs:8018:13:
assertion `left == right` failed
  left: 0
 right: 1
```

Co-authored-by: Dani Acherkan <dtl.117@gmail.com>
2025-01-04 12:53:20 -05:00
ydah
c936699431 Implement FLIP3 NODE locations 2025-01-04 20:27:40 +09:00
ydah
24653430cd Implement FLIP2 NODE locations 2025-01-04 20:27:40 +09:00
ydah
61c4907458 Implement DOT3 NODE locations 2025-01-04 20:27:40 +09:00
ydah
88da6856a3 Implement DOT2 NODE locations 2025-01-04 20:27:40 +09:00
ydah
a1f010b8e4 Use user defined parameterizing rules compstmt(stmts) 2025-01-04 18:59:30 +09:00
ydah
bb66b42a7f Use user defined parameterizing rules op_asgn(rhs) 2025-01-04 18:58:44 +09:00
ydah
2efa78099c Use user defined parameterizing rules def_endless_method(bodystmt) 2025-01-04 18:58:44 +09:00
ydah
4fa68953fb Use user defined parameterizing rules asgn(lhs, rhs) 2025-01-04 18:58:44 +09:00
ydah
1e330dd5ec Use p_primitive_value 2025-01-04 18:07:27 +09:00
ydah
f00c5102c0 Use command_call_value 2025-01-04 18:07:27 +09:00