75686 Commits

Author SHA1 Message Date
Hiroshi SHIBATA
900230837b
Fixed a typo 2023-01-10 13:07:36 +09:00
David Rodríguez
2e0159c5f2 [rubygems/rubygems] Fix resolver edge case
Let it deal with legacy gems with equivalent version and different
dependencies.

https://github.com/rubygems/rubygems/commit/b430babe97
2023-01-10 12:58:28 +09:00
dependabot[bot]
97d52a8ea2 [rubygems/rubygems] Bump rb-sys
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.53 to 0.9.54.
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.53...v0.9.54)

---
updated-dependencies:
- dependency-name: rb-sys
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-10 02:20:54 +00:00
Takashi Kokubun
9792d9e40f Revert "Re-enable test_ractor for YJIT"
This reverts commit 650a20a3e1205f47224a987676cdbad7d826d597.

Now that 3.2.0 is released, let's disable flaky tests. Koichi said he'll
rework Ractor implementation for this, and it has not been done yet.
2023-01-09 17:43:47 -08:00
Takashi Kokubun
df76c54fc2 Allow overriding a gdb command on make gdb
With --enable-yjit, you see an annoying warning like this:

warning: Missing auto-load script at offset 0 in section .debug_gdb_scripts
of file /home/k0kubun/src/github.com/ruby/ruby/.ruby/miniruby.
Use `info auto-load python-scripts [REGEXP]' to list them.

Using `rust-gdb` instead fixes it. I use this like `make gdb GDB=rust-gdb`.
2023-01-09 16:45:50 -08:00
Peter Zhu
72eb33066f Fix off-by-one error in rb_vm_each_stack_value
Applying the following patch to test/erb/test_erb.rb and running that
file will cause Ruby to crash on my machine (macOS 13.1 on M1 Pro):

```
--- a/test/erb/test_erb.rb
+++ b/test/erb/test_erb.rb
@@ -7,6 +7,12 @@
 class TestERB < Test::Unit::TestCase
   class MyError < RuntimeError ; end

+  def setup
+    GC.auto_compact = true
+    GC.stress = true
+    GC.verify_compaction_references(expand_heap: true, toward: :empty)
+  end
+
```

It crashes with the following log:

```
/Users/peter/src/ruby/lib/erb/compiler.rb:276: [BUG] Segmentation fault at 0x00000001083a8690
...
-- C level backtrace information -------------------------------------------
...
/Users/peter/src/ruby/build/ruby(rb_vm_each_stack_value+0xa8) [0x104cc3a44] ../vm.c:2737
/Users/peter/src/ruby/build/ruby(rb_vm_each_stack_value+0xa8) [0x104cc3a44] ../vm.c:2737
/Users/peter/src/ruby/build/ruby(check_stack_for_moved+0x2c) [0x104b272a4] ../gc.c:5512
/Users/peter/src/ruby/build/ruby(gc_compact_finish) ../gc.c:5534
/Users/peter/src/ruby/build/ruby(gc_sweep_compact) ../gc.c:8653
/Users/peter/src/ruby/build/ruby(gc_sweep) ../gc.c:6196
/Users/peter/src/ruby/build/ruby(has_sweeping_pages+0x0) [0x104b19c54] ../gc.c:9568
/Users/peter/src/ruby/build/ruby(gc_rest) ../gc.c:9570
```

This crash happens because it's reading the VALUE at sp. But since
sp points to the top of the stack, it's reading the VALUE above the
top of the stack, which is causing this segfault.

Fixes [Bug #19320]
2023-01-09 16:00:42 -08:00
Takashi Kokubun
0247ccddab Fix a warning in .gdbinit
Warning: 'set logging on', an alias for the command 'set logging enabled', is deprecated.
Use 'set logging enabled on'.
2023-01-09 14:29:18 -08:00
Maxime Chevalier-Boisvert
40bf89872f
Update yjit.md
Add Alan Wu's keynote & Maxime's talk to the list of YJIT-related talks :)
2023-01-09 14:12:10 -05:00
dependabot[bot]
93b2de8278 [rubygems/rubygems] Bump rb-sys in /test/rubygems/test_gem_ext_cargo_builder/custom_name
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.53 to 0.9.54.
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.53...v0.9.54)

---
updated-dependencies:
- dependency-name: rb-sys
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-09 18:43:03 +00:00
Takashi Kokubun
a7fbdc35a2
YJIT: Remove old comments for regenerated branches (#7083) 2023-01-09 11:29:41 -05:00
Peter Zhu
9726736006 Set STR_SHARED_ROOT flag on root of string 2023-01-09 08:49:29 -05:00
Peter Zhu
2ad081f799 Assert that resizing arrays will re-embed them 2023-01-09 08:49:29 -05:00
Peter Zhu
682b45d489 Assert that resizing objects will re-embed them 2023-01-09 08:49:29 -05:00
Peter Zhu
3be2acfafd Fix re-embedding of strings during compaction
The reference updating code for strings is not re-embedding strings
because the code is incorrectly wrapped inside of a
`if (STR_SHARED_P(obj))` clause. Shared strings can't be re-embedded
so this ends up being a no-op. This means that strings can be moved to a
large size pool during compaction, but won't be re-embedded, which would
waste the space.
2023-01-09 08:49:29 -05:00
Nobuyoshi Nakada
29dc9378d9 mkmf.rb: Refine message from pkg_config 2023-01-09 21:44:15 +09:00
Nobuyoshi Nakada
0d7bbfc941 mkmf.rb: Prefer caller_locations over parsing caller 2023-01-09 21:44:15 +09:00
Nobuyoshi Nakada
0a2bf5f1e2 [ruby/zlib] Check for functions with arguments and the header
With arguments, mkmf skips compilation check for the function as RHS.

https://github.com/ruby/zlib/commit/9ed9d6d36e
2023-01-09 10:46:02 +00:00
Nobuyoshi Nakada
9d078fe477 [ruby/zlib] Fix the test broken in older versions
https://github.com/ruby/zlib/commit/fc89ff9ef0
2023-01-09 09:58:43 +00:00
Lars Kanis
f6952a94eb [ruby/psych] Fix wrong package name of MSYS2/MINGW dependency
There is no package called "libyaml-devel". "libyaml" is enough.
2023-01-09 09:39:08 +00:00
Burdette Lamar
41a947e72a [ruby/uri] [DOC] Enhanced RDoc for URI
(https://github.com/ruby/uri/pull/55)

https://github.com/ruby/uri/commit/89ab4f1407
2023-01-08 23:14:50 +00:00
Burdette Lamar
20b691d664 [ruby/uri] [DOC] Enhanced RDoc for URI.decode_www_form
(https://github.com/ruby/uri/pull/53)

https://github.com/ruby/uri/commit/ce379e6125
2023-01-08 17:11:12 +00:00
Nobuyoshi Nakada
8f6a9ad35d
Remove no longer used environment variable [ci skip] 2023-01-09 00:02:29 +09:00
Nobuyoshi Nakada
1cd4db772c
Adjust spec of bundler like as sync_default_gems [ci skip] 2023-01-08 22:14:39 +09:00
Nobuyoshi Nakada
60ccd1ca81
Ignore LICENSE files of libraries vendored in rubygems [ci skip] 2023-01-08 20:58:12 +09:00
Nobuyoshi Nakada
1cdf8ab07b
[Bug #19323] Raise RangeError instead of integer overflow 2023-01-08 20:54:48 +09:00
Nobuyoshi Nakada
89546dce21 [rubygems/rubygems] [DOC] Remove internal document about Kernel monkey patch
https://bugs.ruby-lang.org/issues/19285

https://github.com/rubygems/rubygems/commit/1e22219ed4
2023-01-08 08:09:34 +00:00
Nobuyoshi Nakada
55aa1a206c [rubygems/rubygems] LoadError#path on the caught exception does not need to protect
https://github.com/rubygems/rubygems/commit/a31f5d1a18
2023-01-08 08:09:34 +00:00
Nobuyoshi Nakada
1a1b653c9c [rubygems/rubygems] Let RDoc parse the doc of Kernel#require
Since RDoc does not parse string literals as documents, `eval` the
entire file instead of embedding in a here-document.
On the contrary, as `gem_original_require` alias is an implementation
detail but not for users, it should not be documented.

https://github.com/rubygems/rubygems/commit/cad4cf16cf
2023-01-08 08:09:33 +00:00
Burdette Lamar
fd98169e00 [ruby/uri] [DOC] Common rdoc (https://github.com/ruby/uri/pull/52)
https://github.com/ruby/uri/commit/be8047028f
2023-01-07 19:22:36 +00:00
Benoit Daloze
28cfc0c116 Only RangeError on CRuby for shift width >= 2**67
* It seems a better exception class too than NoMemoryError.
2023-01-07 13:18:04 +01:00
Benoit Daloze
897cf122bf Fix Integer#{<<,>>} specs with large shift width
* The limit depends on the implementation and platform, it seems unavoidable.
* See https://bugs.ruby-lang.org/issues/18518#note-9
2023-01-07 13:13:03 +01:00
Yuki Nishijima
651a098ea1 [ruby/did_you_mean] Keep the deprecated API for another year in case this could break 'bundle install'
https://github.com/ruby/did_you_mean/commit/0f4b0806b7
2023-01-07 08:47:05 +00:00
Nobuyoshi Nakada
e537aa65c0 [ruby/syntax_suggest] Run with the given ruby command
Running the file with shebang has a few issues.

* shebang is an OS dependent feature. Many modern UNIX-like OSes
  support it, but not all, e.g., Windows.
* `env` command may not be in `/usr/bin`.
* "ruby" command may not be "ruby", when `--program-suffix` or other
  configuration option is used.

https://github.com/ruby/syntax_suggest/commit/2edf241055
2023-01-07 17:02:49 +09:00
Nobuyoshi Nakada
69a2687a27 [ruby/bigdecimal] Fix format specifiers for size_t
https://github.com/ruby/bigdecimal/commit/99db3c9754
2023-01-07 03:15:27 +00:00
Nobuyoshi Nakada
41fbcc5193
Fix format specifiers for pointer differences 2023-01-07 11:47:50 +09:00
Takashi Kokubun
00d58afb5d
YJIT: Make iseq_get_location consistent with iseq.c (#7074)
* YJIT: Make iseq_get_location consistent with iseq.c

* YJIT: Call it "YJIT entry point"

Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com>

Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com>
2023-01-06 11:49:59 -08:00
Takashi Kokubun
311ce91733
YJIT: Colorize outlined code differently on --yjit-dump-disasm (#7073)
* YJIT: Colorize outlined code differently

on --yjit-dump-disasm

* YJIT: Reduce the number of escape sequences
2023-01-06 11:49:45 -08:00
Jemma Issroff
66bc620963 Remove unused function rb_shape_flags_mask 2023-01-06 11:46:50 -05:00
Peter Zhu
d8ef0a98c6 [Bug #19319] Fix crash in rb_str_casemap
The following code crashes on my machine:

```
GC.stress = true

str = "testing testing testing"

puts str.capitalize
```

We need to ensure that the object `buffer_anchor` remains on the stack
so it does not get GC'd.
2023-01-06 11:36:28 -05:00
Benoit Daloze
2b88dbc6f9 Add bug number 2023-01-06 16:28:02 +01:00
Burdette Lamar
ddbf7be94d [ruby/uri] [DOC] Enhanced RDoc for common methods
(https://github.com/ruby/uri/pull/50)

https://github.com/ruby/uri/commit/7ff4fb372b
2023-01-06 14:20:38 +00:00
Nobuyoshi Nakada
cee5beab1d [Bug #19312] Return end-of-input at __END__ 2023-01-06 13:13:07 +01:00
Nobuyoshi Nakada
d9520bf2de [DOC] Mention configure options earlier, not after failure
The command line arguments to `configure` are stored in `rbconfig.rb`.
Usually these are just useless but harmless after the installation,
however could affect unexpectedly when updating default gems.
2023-01-06 20:00:53 +09:00
Nobuyoshi Nakada
42820a9807 [DOC] Specify shell format to shell commands 2023-01-06 20:00:53 +09:00
Nobuyoshi Nakada
b94656147b mkmf.rb: Refactor splitting configure_args and remove duplicate code 2023-01-06 20:00:53 +09:00
Nobuyoshi Nakada
cd7e14da4e Pass options for extensions via CONFIGURE_ARGS 2023-01-06 20:00:53 +09:00
Kazuhiro NISHIYAMA
bdd350453c
Fix typos [ci skip] 2023-01-06 17:53:00 +09:00
git
1be669d063 Update bundled gems list at 2023-01-06 2023-01-06 07:02:20 +00:00
Nobuyoshi Nakada
dcf63b58cf [ruby/psych] Strip trailing spaces [ci skip]
https://github.com/ruby/psych/commit/e07b16ad8b
2023-01-06 06:37:01 +00:00
dsisnero
f877805a0c [ruby/psych] Add msys2 dependencies for windows
https://github.com/ruby/psych/commit/9a3816d903
2023-01-06 06:33:08 +00:00