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

87633 Коммитов

Автор SHA1 Сообщение Дата
Kevin Newton d86b4041b5 [ruby/prism] Disallow empty labels when not allowed
https://github.com/ruby/prism/commit/399ee28dc1
2024-10-01 13:51:05 +00:00
Kevin Newton 75568d23e9 [ruby/prism] Disallow &. after endless range
https://github.com/ruby/prism/commit/498dd922d4
2024-10-01 12:57:00 +00:00
Peter Zhu 3932d8a87a Replace heap_eden_total_slots with objspace_available_slots 2024-10-01 08:48:51 -04:00
Nobuyoshi Nakada 86ae409467
[Bug #20764] Refactor argument forwarding in lambda
Reject argument forwarding in lambda:
- without parentheses
- after optional argument(s)
2024-10-01 20:00:22 +09:00
Nobuyoshi Nakada 35e124832e
[Bug #20755] Frozen string should not be writable via IO::Buffer 2024-10-01 18:46:35 +09:00
Hiroshi SHIBATA 3ebc85e240
Define RactorLocalSingleton on .mspec.constants 2024-10-01 18:41:38 +09:00
Hiroshi SHIBATA d109c7c620
Temporary disabled RactorLocalSingleton from constant leak check. 2024-10-01 18:32:40 +09:00
rm155 0f00544984
[ruby/singleton] Make compatible with Ruby 2.4
https://github.com/ruby/singleton/commit/0a77bb492d
2024-10-01 17:59:43 +09:00
rm155 2f53c9fc62
[ruby/singleton] Clean VERSION freezing
https://github.com/ruby/singleton/commit/f31334a736
2024-10-01 17:59:42 +09:00
rm155 d0c1eef511
[ruby/singleton] Only use RactorLocalSingleton if Ractor is defined
https://github.com/ruby/singleton/commit/f684d36a47
2024-10-01 17:59:42 +09:00
rm155 a6e96df573
[ruby/singleton] Change PerRactorSingleton to RactorLocalSingleton
https://github.com/ruby/singleton/commit/1216a86303
2024-10-01 17:59:42 +09:00
rm155 136b30b414
[ruby/singleton] Improve Ractor-compliance; Create PerRactorSingleton
https://github.com/ruby/singleton/commit/ec4f66d9c1
2024-10-01 17:59:42 +09:00
Hiroshi SHIBATA 76111af632 expand relative path 2024-10-01 17:35:38 +09:00
Hiroshi SHIBATA 4822220e6b Pass MSPECOPT from compilers.yml 2024-10-01 17:35:38 +09:00
dependabot[bot] 522614a377 Bump github/codeql-action from 3.26.9 to 3.26.10
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.26.9 to 3.26.10.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](461ef6c76d...e2b3eafc8d)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-01 12:34:58 +09:00
whtsht af63b4f8b7
Return an Iterator Instead of a Vector in `addrs_to_pages` Method (#11725)
* Returning an iterator instead of a vec

* Avoid changing the meaning of end_page

---------

Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
2024-09-30 16:00:54 -07:00
Peter Zhu 30507a4aed Move RUBY_INTERNAL_EVENT_FREEOBJ into GC implementation
Instead of calling rb_gc_event_hook inside of rb_gc_obj_free, it should
be up to the GC implementation to call the event.
2024-09-30 14:23:32 -04:00
Nobuyoshi Nakada 292c9793ab
Remove no longer needed excludes files 2024-10-01 02:55:16 +09:00
Luke Gruber d592ddd5e6 Fix compile issue with a short-circuited if/unless condition and `defined?`
This caused an issue when `defined?` was in the `if` condition. Its
instructions weren't appended to the instruction sequence even though it was compiled
if a compile-time known logical short-circuit happened before the `defined?`. The catch table
entry (`defined?` compilation produces a catch table entry) was still on the iseq even though the
instructions weren't there. This caused faulty exception handling in the method.
The solution is to no add the catch table entry for `defined?` after a compile-time known logical
short circuit.

This shouldn't touch much code, it's only for cases like the following,
which can occur during debugging:

    if false && defined?(Some::CONSTANT)
    "more code..."
    end

Fixes [Bug #20501]
2024-10-01 02:12:56 +09:00
Peter Zhu 2a58092360 Remove unneeded prototype for objspace_available_slots 2024-09-30 12:58:43 -04:00
Kevin Newton 6c9b5c1615 Sync Prism with latest main branch 2024-09-30 11:36:29 -04:00
Kevin Newton c1c9ba77ca [ruby/prism] Require a delimiter for singleton classes
https://github.com/ruby/prism/commit/fd58d6a9ea
2024-09-30 14:33:58 +00:00
Peter Zhu 6b8078cc03 Don't create empty string for interpolation
We don't need to create an empty string for interpolation unless it is
the only element.

For example:

    "#{hello} world"

Before:

    0000 putobject                              ""                        (   1)[Li]
    0002 putself
    0003 opt_send_without_block                 <calldata!mid:hello, argc:0, FCALL|VCALL|ARGS_SIMPLE>
    0005 dup
    0006 objtostring                            <calldata!mid:to_s, argc:0, FCALL|ARGS_SIMPLE>
    0008 anytostring
    0009 putobject                              " world"
    0011 concatstrings                          3
    0013 leave

After:

    0000 putself                                                          (   1)[Li]
    0001 opt_send_without_block                 <calldata!mid:hello, argc:0, FCALL|VCALL|ARGS_SIMPLE>
    0003 dup
    0004 objtostring                            <calldata!mid:to_s, argc:0, FCALL|ARGS_SIMPLE>
    0006 anytostring
    0007 putobject                              " world"
    0009 concatstrings                          2
    0011 leave
2024-09-30 09:09:09 -04:00
Nobuyoshi Nakada 637067440f
[Bug #20752] Slice of readonly `IO::Buffer` also should be readonly 2024-09-30 20:39:14 +09:00
Yusuke Endoh b93c51c114 Free a buffer allocated by realpath
8350b48cfa introduced a memory leak bug.

Will fix [Bug #20773]
`loop { File.realpath("foo") }` caused memory leak.
2024-09-30 20:35:46 +09:00
Earlopain 5ed67f4826 [ruby/rdoc] Only let browser search through source code until it's
expanded
(https://github.com/ruby/rdoc/pull/1181)

Something that's been bothering me is that while the source code is
not visible by default, the browser still jump to it when searching.
Adding the `visible` property prevents this.

Test it out yourself:
* `bundle exec rdoc`
* open `_site/index.html`
* Search for `NameError`

Before, you will get a match from `load_yaml` source code, after
you only get the match when that methods source code is expanded.

https://github.com/ruby/rdoc/commit/003126cc23
2024-09-30 11:32:45 +00:00
Hiroshi SHIBATA 81d26814be
Update test args with bundled gems. webrick has been removed that targets 2024-09-30 19:10:16 +09:00
Hiroshi SHIBATA 8cd36a6dab
Don't warn the bundled gems that are migrated at Ruby 3.0.
We should stop warnings at some point. I decided to that period EOL-ed versions.
ex. In 2024, Ruby 3.0 is EOL. we removed webrick, rexml, rss from warning targets.
2024-09-30 18:53:21 +09:00
Nobuyoshi Nakada c30a3ed027
Fix the last character index in an assertion
Also, when `RUBY_DEBUG` is enabled, objects allocated in shared-gc
fail at `rb_ractor_confirm_belonging`, so assert it always.
2024-09-30 18:17:42 +09:00
ydah ac2786757e Use Named Reference 2024-09-30 18:04:41 +09:00
ydah 044e57ed7c Implement SPLAT NODE keyword locations 2024-09-30 18:04:41 +09:00
卜部昌平 239c1c621e LLVM 20 begun
see also 10c6d6349e
2024-09-30 17:43:56 +09:00
Hiroshi SHIBATA 6abed7eae9 Test with -O3 is flaky now. I disabled it same as before. 2024-09-30 16:20:33 +09:00
David Rodríguez 3a273c4742 [rubygems/rubygems] Fix error when changing a path source to a git source if frozen mode
https://github.com/rubygems/rubygems/commit/4c79ab9b2e
2024-09-30 05:09:16 +00:00
David Rodríguez 1e00763688 [rubygems/rubygems] Fix duplicated spec names
https://github.com/rubygems/rubygems/commit/26f6600197
2024-09-30 05:09:16 +00:00
Earlopain 7d318c2cb2 [rubygems/rubygems] Fix `stub.activated?` sometimes returning false after activation under bundler
Closes https://github.com/rubygems/rubygems/pull/8068

This issue only occurs if the underlying stub is a gem stub:
f56098d8a1/bundler/lib/bundler/stub_specification.rb (L109-L112)

https://github.com/rubygems/rubygems/commit/9b0152b3d5
2024-09-30 05:08:48 +00:00
David Rodríguez dbe69a466f [rubygems/rubygems] I _think_ this workaround is no longer necessary
https://github.com/rubygems/rubygems/commit/6a76fedfd0
2024-09-30 05:08:25 +00:00
David Rodríguez 060932af98 [rubygems/rubygems] Fix old cache format detection when application is not source controlled
https://github.com/rubygems/rubygems/commit/b2adcc0173
2024-09-30 05:08:25 +00:00
David Rodríguez 82f250af45 [rubygems/rubygems] `gem cleanup` no longer needs to reset paths
Since `Gem::Uninstaller` no longer changes paths either.

https://github.com/rubygems/rubygems/commit/427059d45f
2024-09-30 05:07:58 +00:00
David Rodríguez d4ac5c573b [rubygems/rubygems] Don't add duplicated specs to unresolved specs
This could happen when a regular gem shadows a default gem.

https://github.com/rubygems/rubygems/commit/9ef70dd1f7
2024-09-30 05:07:57 +00:00
David Rodríguez 73d60df6e0 [rubygems/rubygems] Don't list duplicated version in `Gem::Specification.reset` warning
https://github.com/rubygems/rubygems/commit/e6e3db821f
2024-09-30 05:07:57 +00:00
ydah 1b6c234fec s/reproducable/reproducible/ 2024-09-30 13:04:49 +09:00
Hiroshi SHIBATA 3fe59b04d6
-l option of 7z is unknown switch with the `ubuntu-latest`.
https://github.com/ruby/actions/actions/runs/11095032727/job/30823174026#step:3:349
2024-09-30 12:03:02 +09:00
Hiroshi SHIBATA 3a9e48b9a4
Fixed warning condition with LoadError 2024-09-30 11:35:59 +09:00
Nobuyoshi Nakada 28a01e306a Ruby exception cannot work here
Just show error messages then ignore the invalid library.
2024-09-30 10:27:30 +09:00
Burdette Lamar 03ca99c93b
[DOC] Tweaks for Array#hash (#11704) 2024-09-29 21:22:43 -04:00
Burdette Lamar 5be11c1d1b
[DOC] Tweaks for Array#first (#11687) 2024-09-29 21:21:55 -04:00
Burdette Lamar 116395d315
[DOC] Tweaks for Array#flatten! (#11689) 2024-09-29 21:21:26 -04:00
Burdette Lamar 154ec2d242
[DOC] Tweaks for Array#insert (#11709) 2024-09-29 21:21:11 -04:00
Lars Kanis 9b4a497456 Fix loading of nonascii script name on Windows
Since the prism parser was enabled by default, loading scripts with nonascii characters somewhere in the script path is no longer working.
It only works when the codepage was switched to 65001 (UTF-8).

This patch doesn't change the encoding of __FILE__. It is still in locale encoding.
That's why pm_load_file() is called with UTF-8 script name and pm_parse_file() with locale encoding.

The loading of nonascii script names is part of the test-all, but it doesn't trigger the failure on GHA, since it is using cp 65001.
On other codepages it fails with:

[53/71] TestRubyOptions#test_command_line_progname_nonascii = 0.04 s
  1) Failure:
TestRubyOptions#test_command_line_progname_nonascii [C:/Users/Administrator/ruby/test/ruby/test_rubyoptions.rb:1086]:
[ruby-dev:48752] [Bug #10555]
pid 1736 exit 1
| C:\Users\Administrator\ruby\ruby.exe: No such file or directory -- �.rb (LoadError)
.

1. [1/2] Assertion for "stdout"
   | <["\xFF.rb"]> expected but was
   | <[]>.

2. [2/2] Assertion for "stderr"
   | <[]> expected but was
   | <["C:\\Users\\Administrator\\ruby\\ruby.exe: No such file or directory -- \xFF.rb (LoadError)"]>.
2024-09-29 19:01:18 -04:00