Commit graph

89192 commits

Author SHA1 Message Date
Stan Lo
5e8c9b4b28
[DOC] Fix grammar errors, typos, and improve readability of trace_point.rb (#12150) 2024-12-12 16:44:15 -05:00
Stan Lo
ff8570b005 Fix LoadError's linking issue
Original issue: https://github.com/ruby/rdoc/issues/1128

The problem is caused by the `# :stopdoc:` directive in `bundled_gems.rb`,
which's scope covers the redefinition of `LoadError`.

Since the goal of `# :stopdoc:` is to hide the documentation of `Gem::BUNDLED_GEMS`,
we can use `# :nodoc:` on it instead.
2024-12-12 16:43:25 -05:00
Koichi Sasada
0bdb38ba6b Ractor.set_if_absent(key)
to initialize ractor local storage in thread-safety.
[Feature #20875]
2024-12-13 06:22:13 +09:00
Peter Zhu
79d90e7351 Call rb_bug_without_die when ASAN error reported
This will give us the Ruby stack trace when an ASAN error is reported.
2024-12-12 14:07:56 -05:00
Peter Zhu
2da70aac25 Don't output memory map in crash report for ASAN
ASAN maps a large amount of memory, which makes the memory map section
massive.
2024-12-12 14:07:56 -05:00
Peter Zhu
ca2d19d4e5 Implement rb_bug_without_die 2024-12-12 14:07:56 -05:00
James Reid-Smith
c0caf1cc1a [ruby/irb] Load history when starting a direct debug session
(https://github.com/ruby/irb/pull/1046)

* Load history when starting a direct debug session

When starting a debug session directly with RUBY_DEBUG_IRB_CONSOLE=1 and
`require 'debug'; debugger`, IRB's history wasn't loaded. This commit ensures
history is loaded in this case by calling `load_history` when configuring IRB
for the debugger.

Fixes ruby/irb#975

* Update test/irb/test_history.rb

* Update lib/irb/debug.rb

---------

7f851b5353

Co-authored-by: Stan Lo <stan001212@gmail.com>
2024-12-12 17:26:06 +00:00
tomoya ishida
300be2b192 [ruby/reline] Undo and redo should restore indentation
(https://github.com/ruby/reline/pull/793)

* Undo and redo should restore indentation

Undo and redo should not perform auto indentation. It should not change the indentation. Instead, it should restore previous indentation.

* Rename ivar undoing(undoing or redoing) to restoring

6355a6e0b2
2024-12-12 16:40:08 +00:00
Nobuyoshi Nakada
776ec52148 [ruby/win32ole] Deprecate old constants in toplevel
eaa1507262
2024-12-12 14:39:20 +00:00
Nobuyoshi Nakada
20b62ac063 [ruby/win32ole] [DOC] Hide old constants for the backward compatibility from RDoc
99e1ea403f
2024-12-12 14:16:29 +00:00
Nobuyoshi Nakada
ca427e63ad [ruby/win32ole] [DOC] Fix a markup for code
542d39372c
2024-12-12 14:16:28 +00:00
NARUSE, Yui
54964526c6 increase diff.renameLimit 2024-12-12 22:58:44 +09:00
git
a0f59a59ad Update default gems list at 911879e01f [ci skip] 2024-12-12 13:15:55 +00:00
Stan Lo
911879e01f [ruby/irb] Bump version to v1.14.2
(https://github.com/ruby/irb/pull/1045)

dd31884657
2024-12-12 13:14:56 +00:00
Nobuyoshi Nakada
197a3efc75
[Feature #20884] News of toplevel "Ruby" name reservation 2024-12-12 18:30:43 +09:00
Nobuyoshi Nakada
4d86f3bf6d [Feature #20884] Reserve "Ruby" toplevel name 2024-12-12 17:45:06 +09:00
Nobuyoshi Nakada
267ecf5f02 Add rb_warn_reserved_name_at 2024-12-12 17:45:06 +09:00
Naoto Ono
46e8a26c17
Launchable: Start recording test-spec results (#12302) 2024-12-12 16:32:35 +09:00
git
3fda6e92ad Update default gems list at 78ca87f8a8 [ci skip] 2024-12-12 07:15:58 +00:00
Hiroshi SHIBATA
78ca87f8a8
Lock released version of strscan-3.1.1 2024-12-12 16:14:25 +09:00
Hiroshi SHIBATA
6a1aaf3679
Separated load path for test-bundler tasks for Windows 2024-12-12 15:10:21 +09:00
git
52be46ab50 * append newline at EOF. [ci skip] 2024-12-12 05:43:17 +00:00
Hiroshi SHIBATA
58f3cdad26 tmp/test-pipes is no longer needed 2024-12-12 14:43:07 +09:00
Hiroshi SHIBATA
f43e04ce09 Hide pending results of turbo_tests 2024-12-12 14:43:07 +09:00
Hiroshi SHIBATA
5d5525e3a8 Use directory structure and GEM_HOME for ruby-core repository 2024-12-12 14:43:07 +09:00
Hiroshi SHIBATA
1967ae20b9 Use patched version of turbo_tests 2024-12-12 14:43:07 +09:00
Hiroshi SHIBATA
91f6c370af Use turbo_tests instead of parallel_tests 2024-12-12 14:43:07 +09:00
Kevin Newton
29caae9991 [ruby/prism] Use isinf on non-mingw windows
2f903d7865
2024-12-12 01:10:13 +00:00
John Hawthorn
36f49eb2b4 Fix compilation with MALLOC_ALLOCATED_SIZE
Previously compilation failed with -DMALLOC_ALLOCATED_SIZE=1

Co-authored-by: Matthew Draper <matthew@trebex.net>
2024-12-11 16:58:35 -08:00
Aaron Patterson
9181e8bc87 [ruby/prism] Decode %r like % strings
%r regular expressions need to be decoded like strings.  This commit
fixes %r decoding so it works like strings.

85bfd9c0cd
2024-12-12 00:42:44 +00:00
Aaron Patterson
0a1fa99482 [ruby/prism] Same numbered param cannot be used in child blocks
Raise an exception when the same numbered param is used inside a child
block.  For example, the following code should be a syntax error:

```ruby
-> { _1 + -> { _1 } }
```

Fixes https://github.com/ruby/prism/pull/3291

d4fc441838
2024-12-12 00:42:27 +00:00
John Hawthorn
54f8e6fbbc Use malloc for prism string source
Prism will later free this string via free rather than xfree, so we need
to use malloc rather than xmalloc.

Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
Co-authored-by: Matthew Draper <matthew@trebex.net>
2024-12-11 16:30:57 -08:00
John Hawthorn
d84859061a Use ruby_strdup/xfree in fast_fallback
Any memory allocated with xmalloc needs to be matched with xfree rather
than plain free.

Ruby unfortunately redefines strdup to be ruby_strdup, which uses
xmalloc so needs to be xfreed. Previously these were mismatched.

This commit changes the copy to be an explicit ruby_strdup (to avoid
confusion) and the free to be xfree.
2024-12-11 15:37:32 -08:00
eileencodes
9fe6fd8693 [ruby/prism] Fix percent delimiter strings with crlfs
parse.y treats CRLF as a LF and basically "normalizes" them before
parsing.  That means a string like `%\nfoo\r\n` is actually treated as
`%\nfoo\n` for the purposes of parsing.  This happens on both the
opening side of the percent string as well as on the closing side.  So
for example `%\r\nfoo\n` must be treated as `%\nfoo\n`.

To handle this in Prism, when we start a % string, we check if it starts
with `\r\n`, and then consider the terminator to actually be `\n`.  Then
we check if there are `\r\n` as we lex the string and treat those as
`\n`, but only in the case the start was a `\n`.

Fixes: #3230

[Bug #20938]

e573ceaad6

Co-authored-by: John Hawthorn <jhawthorn@github.com>
Co-authored-by: eileencodes <eileencodes@gmail.com>
Co-authored-by: Kevin Newton <kddnewton@gmail.com>
2024-12-11 23:06:32 +00:00
Alan Wu
d53e4545f4 YJIT: Fix unread field lint in release builds
```
warning: fields `blue_begin` and `blue_end` are never read
```
2024-12-11 17:44:43 -05:00
Alan Wu
9fe06cc035 YJIT: Disable static_mut_refs for now 2024-12-11 17:44:43 -05:00
Alan Wu
6cb75564f9 YJIT: Use the correct size constant 2024-12-11 17:44:43 -05:00
Kevin Newton
34e68548d4 [ruby/prism] Bump typechecking deps
230c8b8a48
2024-12-11 19:50:20 +00:00
David Rodríguez
cfb7213882 [rubygems/rubygems] Normalize CLI flag documentation and make sure all flags are documented
20a834818b
2024-12-11 17:56:28 +00:00
Adam Leach
e1fcf20ea1 [rubygems/rubygems] Add documentation for changelog flags in bundle gem
The --changelog and --no-changelog flags are missing from docs, this adds them in a way that matches other flags

92f77678fe
2024-12-11 17:56:28 +00:00
David Rodríguez
f658f66124 [rubygems/rubygems] Add missing --pre flag to bundle update --help
21335a7378
2024-12-11 17:56:27 +00:00
David Rodríguez
af11c8ef4f [rubygems/rubygems] Add missing --outdated flag to bundle show --help
2864e54ce3
2024-12-11 17:56:27 +00:00
David Rodríguez
a1fee6de95 [rubygems/rubygems] Add missing flags documentation to bundle outdated --help
ad3b654bf3
2024-12-11 17:56:26 +00:00
David Rodríguez
1806f3facc [rubygems/rubygems] Add several missing flags to bundle lock --help
4070da1264
2024-12-11 17:56:26 +00:00
David Rodríguez
496e791a2e [rubygems/rubygems] Add missing flag documentation to bundle inject --help
2a01773cdb
2024-12-11 17:56:25 +00:00
David Rodríguez
6e3a6f6411 [rubygems/rubygems] Add missing --version flag to bundle info --help
5022b49e31
2024-12-11 17:56:25 +00:00
David Rodríguez
f5ed1b56d0 [rubygems/rubygems] Add several missing flags to bundle gem --help
aaf6398870
2024-12-11 17:56:24 +00:00
David Rodríguez
443319de35 [rubygems/rubygems] Add missing --gemfile flag to exec, lock, and update command's help
418dfbf373
2024-12-11 17:56:24 +00:00
David Rodríguez
c4bd744800 [rubygems/rubygems] Normalize whitespace in option lists in man pages
33ff4f8f2f
2024-12-11 17:56:24 +00:00
David Rodríguez
5633cff415 [rubygems/rubygems] Add missing flag documentation to bundle cache --help
b760a882a1
2024-12-11 17:56:23 +00:00