75686 Commits

Author SHA1 Message Date
Nobuyoshi Nakada
dd0b401716
Ensure newline at EOF [ci skip]
Cf. https://github.com/ruby/ruby/pull/7069
2023-01-06 12:13:15 +09:00
Aaron Patterson
6c618cb789 Use a different name for megamorphic setivar exits
We should differentiate between set and get for megamorphic exits.  This
patch fixes the megamorphic exit name in gen_setinstancevariable so that
we can tell the difference between megamorphic get / set sites
2023-01-05 17:49:30 -08:00
yui-knk
979dd02e2f Check if the argument is Thread::Backtrace::Location object
[Bug #19262]
2023-01-06 09:22:09 +09: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
Benoit Daloze
53938efd7b Update to ruby/spec@5e48206 2023-01-05 21:07:29 +01:00
Peter Zhu
29a5fcd60b Add RBIMPL_ATTR_NORETURN to unknown_directive
Fixes a compiler warning about the function unknown_directive:

pack.c:160:1: warning: function 'unknown_directive' could be declared with attribute 'noreturn' [-Wmissing-noreturn]
2023-01-05 14:55:14 -05:00
Benoit Daloze
ec14861f0d Update to ruby/spec@7e680fa 2023-01-05 20:23:57 +01:00
Takashi Kokubun
1fb0255962
Skip reviews for cruby_bindings-only PRs [ci skip] (#7004) 2023-01-05 13:18:03 -05:00
Peter Zhu
273dca3aed Fix undefined behavior in shape.c
Under strict aliasing, writing to the memory location of a different
type is not allowed and will result in undefined behavior. This was
happening in shape.c due to `rb_id_table_lookup` writing to the memory
location of `VALUE *` that was casted from a `rb_shape_t **`.

This was causing test failures when compiled with LTO.

Fixes [Bug #19248]

Co-Authored-By: Alan Wu <alanwu@ruby-lang.org>
2023-01-05 13:14:11 -05:00
git
54950a78e3 * remove trailing spaces, append newline at EOF. [ci skip] 2023-01-05 18:06:01 +00:00
Benoit Daloze
bbf54ec334 Update to ruby/spec@9d69b95 2023-01-05 19:05:29 +01:00
Benoit Daloze
cd5e6cc0ea Update to ruby/mspec@fef9b81 2023-01-05 19:05:27 +01:00
Benoit Daloze
03dd37775a Raise an ArgumentError for unknown pack/unpack directive
* [Bug #19150]
2023-01-05 19:05:03 +01:00
Peter Zhu
358f325bf8 [DOC] Fix formatting for GC.stat 2023-01-05 09:24:32 -05:00
Stan Lo
f9148d1580 [ruby/irb] Group command test cases with class
(https://github.com/ruby/irb/pull/491)

Currently, IRB has 35 test cases for 10 non-debugging commands, with the
rest 10 commands untested. So in the long-term, it could have around 70
test cases for all existing commands.

With this number of test cases, I think it's easier to manage them by grouping
them in classes (by command).
2023-01-05 13:06:23 +00:00
Yusuke Endoh
4959e01932 common.mk: Do not invoke outdate-bundled-gems by default
If baseruby is available (and its version is different from one being
built) when compiling ruby, tool/outdate-bundled-gems.rb (which is
invoked by `make install`) wrongly deletes debug.so and rbs_extension.so
in .bundle/extension/*.

This leads to a broken installation of ruby which lacks the libraries,
which may make rubygems show the following warnings (in some additional
complex conditions):

```
$ irb
Ignoring debug-1.7.1 because its extensions are not built. Try: gem pristine debug --version 1.7.1
Ignoring rbs-2.8.2 because its extensions are not built. Try: gem pristine rbs --version 2.8.2
irb(main):001:0>
```

According to some committers, tool/outdate-bundled-gems.rb is introduced
for fixing a build issue, but the detail is not recorded. The issue
seems to occur only when debug gem or rbs gem is updated, so it is
difficult to fix the script so soon.

Tentatively, this change stops invoking the script by default.
This should be backported to ruby_3_2.

Fixes [Bug #19271]
2023-01-05 18:26:35 +09:00
Nobuyoshi Nakada
ee6e4d63df
Extract only one revision in header [ci skip]
Both of `$(srcdir)/revision.h` and `revision.h` exist because they are
the same file when in-place build.
2023-01-05 15:16:29 +09:00
Hiroshi SHIBATA
b496578758
Skip Test::Unit::AutoRunner logic in ruby/ruby repository 2023-01-05 08:16:24 +09:00
Hiroshi SHIBATA
1f2fef1f9a
[ruby/openssl] Stop AutoRunner with test-unit
https://github.com/ruby/openssl/commit/0d4cd8b9ca
2023-01-05 08:06:49 +09:00
Peter Zhu
837ef8911c Fix crash in TracePoint c_call for removed method
trace_arg->id is the ID of the original method of an aliased method. If
the original method is removed, then the lookup will fail. We should use
trace_arg->called_id instead, which is the ID of the aliased method.

Fixes [Bug #19305]
2023-01-04 14:59:40 -05:00
Burdette Lamar
f7243d1afb [ruby/uri] [DOC] Common methods rdoc
(https://github.com/ruby/uri/pull/49)

https://github.com/ruby/uri/commit/02dfc79366
2023-01-04 19:59:05 +00: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
Peter Zhu
3bcf92d8af Allow malloc during gc when GC has been disabled
We should allow malloc during GC when GC has been explicitly disabled
since garbage_collect_with_gvl won't do anything if GC has been disabled.
2023-01-04 09:10:58 -05:00
yoka
799d805e21 [rubygems/rubygems] Raise invalid option when bundle open --path is called without a value
https://github.com/rubygems/rubygems/commit/c242311158
2023-01-04 13:13:19 +00:00
yoka
87c17a141d [rubygems/rubygems] Enhance bundle open with --path option
https://github.com/rubygems/rubygems/commit/3bf8e59304
2023-01-04 13:13:19 +00:00
Stan Lo
3d6500ee6e [ruby/irb] workspace.rb cleanup
(https://github.com/ruby/irb/pull/489)

* Remove unnecessary Binding#source_location check

`Binding#source_location` was added in 2.6, which is the minimum supported
version now. So this check is no longer necessary.

* Remove unused IRB.delete_caller

This method was added in the earliest version of IRB:

f47808999d

But it's not currently referenced by anything. We can verify this with a
org-wide search result:

https://github.com/search?q=org%3Aruby+delete_caller&type=code
2023-01-04 09:35:57 +00:00
Joel Anderson
e25c173c97 [ruby/reline] correct Win32API capitalization for JRuby
JRuby 9.4.0.0 introduced a change in case sensitivity in require statements,
meaning that an inclusion of `win32api` loaded Win32API.rb. With this change,
the require statement needs to be updated to the correct capitalization of the
filename to avoid reline failures in newer versions of JRuby.

https://github.com/ruby/reline/commit/d6e7c9e1d9
2023-01-04 06:32:46 +00:00
Hiroshi SHIBATA
d57148e9e2 Pin octokit/request-action@v2.1.7 2023-01-04 12:56:46 +09:00
dependabot[bot]
b8673f8b5b Bump ruby/setup-ruby from 1.128.0 to 1.133.0
Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.128.0 to 1.133.0.
- [Release notes](https://github.com/ruby/setup-ruby/releases)
- [Commits](4b2d1d631e...09c10210cc)

---
updated-dependencies:
- dependency-name: ruby/setup-ruby
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-04 10:02:17 +09:00
Alan Wu
c240a18968 YJIT: Dump spill error to stderr [ci skip]
Since the panic message is in stderr, better to use the same stream in
case stdout and stderr are not synced due to IO redirection.
2023-01-03 16:33:47 -05:00
Alan Wu
43ff0c2c48 YJIT: Fix yield into block with >=30 locals on ARM
It's a register spill issue. Fix by moving the Qnil fill snippet to
after registers are released.

[Bug #19299]
2023-01-03 16:17:50 -05:00
dependabot[bot]
1f9b6bfa93 Bump actions/cache from 3.2.0 to 3.2.2
Bumps [actions/cache](https://github.com/actions/cache) from 3.2.0 to 3.2.2.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](c17f4bf466...4723a57e26)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-03 12:03:00 -05:00
Peter Zhu
184739f1e2 [ci skip] Remove trailing semicolon in gc.c 2023-01-03 11:43:43 -05:00
Nobuyoshi Nakada
1bb0749c5b [DOC] Move the internal document for Init_class_hierarchy
It has hidden the document for `Object` class.
2023-01-04 01:18:24 +09:00
Burdette Lamar
59cf9ebf4d [ruby/uri] [DOC] Enhanced RDoc for common methods
(https://github.com/ruby/uri/pull/48)

https://github.com/ruby/uri/commit/2bfd848c26
2023-01-03 15:33:45 +00:00
Matt Valentine-House
0dc989d031 Fix Error in GC Compaction specs
Previously if any of the tests that move objects between size pools
failed to move anything, then the call to stats.dig would return `nil`
which would then cause assert_operator to error.

This should be a test Failure, rather than an Error so this commit uses
a default value of 0 if stats.dig fails to find a key.

Also refactor object movement tests to use stats.dig, rather than :[]
2023-01-03 08:47:48 -05:00
nagachika
fdac148637 NEWS.md: remove a redundant bundled gems entry. [ci skip] 2023-01-03 17:15:28 +09:00
git
d87cf4cc2a Update bundled gems list at 2bbf63dd867fe3d349b1758805ad44 [ci skip] 2023-01-03 06:47:33 +00:00
Takashi Kokubun
2bbf63dd86 Remove lib/mjit/instruction.rb
This was accidentally re-introduced in f6620037ba1477d2c337d7b511f094d6d0fbb69c.

[Bug #19298]
2023-01-02 13:13:01 -08:00
tomoya ishida
34f8ca1714 [ruby/irb] Fix prompt and code mismatch
(https://github.com/ruby/irb/pull/386)

* fix prompt and code mismatch

* Add test for prompt and code mismatch bug

https://github.com/ruby/irb/commit/a5765d8177

Co-authored-by: Stan Lo <stan001212@gmail.com>
2023-01-02 19:25:11 +00:00
Nobuyoshi Nakada
5be0d42d2c
[Bug #19296] Precheck bits of time components 2023-01-02 23:29:19 +09:00
Nobuyoshi Nakada
291a4098cf
Add missing assertion 2023-01-02 23:17:27 +09:00
Nobuyoshi Nakada
3becc4a105
[Bug #19291] Rewind to the previous line
When rewinding looking ahead after newline token, also reset the last
line string, the pointers to it, and the location, not only the line
number.
2023-01-02 16:12:08 +09:00
Nobuyoshi Nakada
1912bf5461
Adjut indent [ci skip] 2023-01-02 16:12:08 +09:00
git
51021fc710 Update bundled gems list at 2023-01-02 2023-01-02 07:04:24 +00:00
Jeremy Evans
0903a25179 Make IO#set_encoding with binary external encoding use nil internal encoding
This was already the behavior when a single `'external:internal'`
encoding specifier string was passed.  This makes the behavior
consistent for the case where separate external and internal
encoding specifiers are provided.

While here, fix the IO#set_encoding method documentation to
state that either the first or second argument can be a string
with an encoding name, and describe the behavior when the
external encoding is binary.

Fixes [Bug #18899]
2023-01-01 09:00:24 -08:00
Mark Doliner
a4e9606da4 [rubygems/rubygems] Remove stray word in bundle config man page.
There was an extra word ("with") in this sentence.

https://github.com/rubygems/rubygems/commit/ad3de5126c
2023-01-01 15:04:43 +00:00
BurdetteLamar
44b7fd8d4f [ruby/net-http] Enhanced RDoc for HTTPHeader
https://github.com/ruby/net-http/commit/6a282eccdd
2023-01-01 15:02:14 +00:00
Nobuyoshi Nakada
542e984d82
[Bug #19292] Re-initialize tm when wday or yday is not set 2023-01-01 16:39:00 +09:00
Nobuyoshi Nakada
f527a0911d
[DOC] [Bug #19290] fix formatting 2023-01-01 14:50:39 +09:00