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

75960 Коммитов

Автор SHA1 Сообщение Дата
Koichi Sasada 0a82bfe5e1
use correct svar (#7225)
* use correct svar

Without this patch, svar location is used "nearest Ruby frame".
It is almost correct but it doesn't correct when the `each` method
is written in Ruby.

```ruby
class C
  include Enumerable
  def each
    %w(bar baz).each{|e| yield e}
  end
end

C.new.grep(/(b.)/){|e| p [$1, e]}
```

This patch fix this issue by traversing ifunc's cfp.

Note that if cfp doesn't specify this Thread's cfp stack, reserved
svar location (`ec->root_svar`) is used.

* make yjit-bindgen

---------

Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
2023-02-01 16:13:19 -08:00
Maxime Chevalier-Boisvert 2675f2c864 Remove whitespace 2023-02-01 16:05:22 -05:00
Peter Zhu c6f84e9189 [Bug #19398] Memory leak in WeakMap
There's a memory leak in ObjectSpace::WeakMap due to not freeing
the `struct weakmap`. It can be seen in the following script:

```
100.times do
  10000.times do
    ObjectSpace::WeakMap.new
  end

  # Output the Resident Set Size (memory usage, in KB) of the current Ruby process
  puts `ps -o rss= -p #{$$}`
end
```
2023-02-01 13:23:55 -05:00
Hiroshi SHIBATA 375f527ded [rubygems/rubygems] Introduce to specify deprecated version for rubygems_deprecate_command.
We sometimes to remove minor command without bumping major version. This feature
  helps this deprecation process.

https://github.com/rubygems/rubygems/commit/41301cd2a8
2023-02-01 16:44:55 +00:00
Peter Zhu aa222b56fa [ruby/bigdecimal] Make BigDecimal WB protected
BigDecimal has no references, so it is WB protected.

https://github.com/ruby/bigdecimal/commit/29c61c90e8
2023-02-01 15:59:11 +00:00
NARUSE, Yui 269c5d408f fix to work with the case default issue is used 2023-02-01 22:49:54 +09:00
Nobuyoshi Nakada 62146d3cee
Fix a typo 2023-02-01 22:45:45 +09:00
Nobuyoshi Nakada 9445a14d31
Suppress an unused-function warning 2023-02-01 22:42:12 +09:00
Nobuyoshi Nakada ee3176a27a
Reject VS2022 compiler versions with the known bugs 2023-02-01 17:13:01 +09:00
dependabot[bot] 941783461f Bump ruby/setup-ruby from 1.133.0 to 1.134.0
Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.133.0 to 1.134.0.
- [Release notes](https://github.com/ruby/setup-ruby/releases)
- [Commits](09c10210cc...ee26e27437)

---
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-02-01 16:25:22 +09:00
dependabot[bot] 4f4038e634 Bump actions/cache from 3.2.2 to 3.2.4
Bumps [actions/cache](https://github.com/actions/cache) from 3.2.2 to 3.2.4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](4723a57e26...627f0f41f6)

---
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-02-01 16:24:49 +09:00
Nobuyoshi Nakada 7b343d9c67 Extract body rules from endless method definitions 2023-02-01 16:17:12 +09:00
dependabot[bot] eb8f284cf2 Bump github/codeql-action from 2.1.37 to 2.2.1
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.1.37 to 2.2.1.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](959cbb7472...3ebbd71c74)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-01 13:56:43 +09:00
dependabot[bot] ea572708d6 Bump actions/upload-artifact from 3.1.1 to 3.1.2
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3.1.1 to 3.1.2.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](83fd05a356...0b7f8abb15)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-01 13:56:29 +09:00
dependabot[bot] 41e84c7b09 Bump actions/checkout from 3.2.0 to 3.3.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](755da8c3cf...ac59398561)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-01 13:56:14 +09:00
Takashi Kokubun 5694515460
Document BUNDLED_GEMS in make test 2023-01-31 15:02:44 -08:00
Jimmy Miller 1148fab7ae
YJIT: Handle splat with opt more fully (#7209)
* YJIT: Handle splat with opt more fully

* Update yjit/src/codegen.rs

---------

Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com>
2023-01-31 16:18:56 -05:00
BurdetteLamar 3ebc80314c [ruby/net-http] Redirection revision
https://github.com/ruby/net-http/commit/9a4e2d3a2a
2023-01-31 21:01:04 +00:00
Maxime Chevalier-Boisvert 97740a525e
Update yjit.md
Update some out of date information and mention how to check that YJIT is enabled.
2023-01-31 15:53:40 -05:00
Peter Zhu 9f9dca0c52 Remove rb_hash_ar_table_p
It's dead code and duplicate of RHASH_AR_TABLE_P.
2023-01-31 15:48:09 -05:00
Peter Zhu 2296b877d8 Remove rb_hash_st_table
It's a duplicate of RHASH_ST_TABLE.
2023-01-31 15:48:09 -05:00
Peter Zhu 2866f951c5 Remove rb_hash_ar_table
It's dead code and duplicate of RHASH_AR_TABLE.
2023-01-31 15:48:09 -05:00
Takashi Kokubun e11067ebbf
YJIT: Fix BorrowMutError on BOP invalidation (#7212) 2023-01-31 15:26:56 -05:00
Alan Wu eac5ae22e2 YJIT: Group unimplemented method types together
Grouping these together helps with finding all of the unimplemented
method types. It was interleaved with some other match arm long and
short previously.
2023-01-31 14:29:18 -05:00
Maxime Chevalier-Boisvert 4ce642620f
Make sure RUBY_YJIT_ENABLE only enables YJIT for truthy values (#7208)
* Make sure RUBY_YJIT_ENABLE only enables YJIT for truthy values

Addresses bug reported in: https://github.com/Shopify/yjit/issues/309

* Update ruby.c

Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>

---------

Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
2023-01-31 12:18:41 -05:00
Takashi Kokubun 74e52c2a17
Disable broken last_files_match_only for now 2023-01-31 09:15:05 -08:00
Maxime Chevalier-Boisvert c221a40201
Update yjit.md 2023-01-31 10:33:08 -05:00
Takashi Kokubun 2a0bf269c9
YJIT: Implement codegen for Kernel#block_given? (#7202) 2023-01-31 10:11:10 -05:00
Takashi Kokubun 2181a66374
Test VM_CHECK_MODE on GitHub Actions (#7204)
It's disabled in compilers.yml, but it's nice to test CHECK_CANAY
on GitHub Actions as well.
2023-01-31 06:48:24 -08:00
Kunshan Wang de724487f0 Copying GC support for EXIVAR
Instance variables held in gen_ivtbl are marked with rb_gc_mark.  It
prevents the referenced objects from moving, which is bad for copying
garbage collectors.

This commit allows those instance variables to be updated during
gc_update_object_references.
2023-01-31 09:24:26 -05:00
Burdette Lamar d92289f633 [ruby/net-http] [DOC] Enhanced RDoc for Net::HTTP
(https://github.com/ruby/net-http/pull/110)

https://github.com/ruby/net-http/commit/b098caa5e4
2023-01-31 14:18:50 +00:00
Nobuyoshi Nakada be81495c16
Silence dozens of useless warnings from `nm` on macOS 2023-01-31 19:42:01 +09:00
Takashi Kokubun 337189598a
Fix a broken matrix (#7207)
$arch and $configure seem to be just ignored in #7205.
2023-01-30 23:39:33 -08:00
Takashi Kokubun 6d1077974f
Use matrix.entry for the Ubuntu workflow (#7205)
This seems easier to understand.

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2023-01-30 22:44:24 -08:00
Mau Magnaguagno 5b67c15cd8
[ruby/openssl] [DOC] Remove repeated example from Digest
https://github.com/ruby/openssl/commit/5a36cc3cb2
2023-01-31 13:14:06 +09:00
Hiroshi SHIBATA fe7d4eed25
Manually merged https://github.com/ruby/net-http/pull/106
Co-authored-by: Peter Zhu <peter@peterzhu.ca>
Co-authored-by: BurdetteLamar <burdettelamar@yahoo.com>
2023-01-31 13:14:05 +09:00
Charles Oliver Nutter 0ee819b71d
Initial move to SnakeYAML Engine
See jruby/jruby#7570 for some of the justification for this move. We only
require the parser from SnakeYAML, but in the original form it is
encumbered with Java object serialization code that keeps getting
flagged as a CVE risk. We disagree with the assessment, at least
as it pertains to JRuby (we do not use the code in question) but
our inclusion of the library continues to get flagged by auditing
tools.

This commit starts the process of moving to the successor library,
SnakeYAML Engine. The parser API is largely unchanged, except as
seen in this commit. No Java exceptions are thrown, but a number
of Psych tests fail (possibly due to Engine being YAML 1.2 only).
2023-01-31 13:14:05 +09:00
Charles Oliver Nutter 29133794a3
[ruby/psych] Update for stricter 1.2 syntax
This allows these tests to pass on SnakeYAML Engine -- which is a
1.2-only YAML library -- while still passing on libyaml 1.1.

https://github.com/ruby/psych/commit/f44269fc9b
2023-01-31 13:14:05 +09:00
NARUSE, Yui b0b61623ad Add quotes to backport field 2023-01-31 10:53:57 +09:00
Hiroshi SHIBATA d3822c9a8a Merge RubyGems/Bundler master.
Pick from 5ace20dbec
2023-01-31 10:49:08 +09:00
David Rodríguez 4cbfd87e5a [rubygems/rubygems] Allow disabling RubyGems require decorations
Currently Bundler needs to do cumbersome operations to revert custom
RubyGems require on a `bundler/setup` context. This causes issues when
third party gems also monkeypatch require, since Bundler will also undo
those decorations.

This commit allows it to use the simpler approach of properly telling
RubyGems that it needs to default to built-in require without any extra
magic.

https://github.com/rubygems/rubygems/commit/1df5009e14

Co-authored-by: Xavier Noria <fxn@hashref.com>
2023-01-31 10:49:08 +09:00
David Rodríguez 022acb9593 [rubygems/rubygems] Don't load Bundler from RubyGems tests
https://github.com/rubygems/rubygems/commit/c2e4cb7b5e
2023-01-31 10:49:08 +09:00
Mike Dalessio 927141a555 [rubygems/rubygems] Add test for old lockfile with new ruby version
Given an existing application using native gems (e.g., nokogiri)
And a lockfile generated with a stable ruby version
When we test the application against ruby-head and `bundle install`
Then bundler should fall back to the generic ruby platform gem

Note that this test has been passing since 45931ac9

https://github.com/rubygems/rubygems/commit/0ecc6de378
2023-01-31 10:49:08 +09:00
Tim Bates 369ed03cd4 [rubygems/rubygems] Fix issue with extensions not compiling properly using inline gemfile
https://github.com/rubygems/rubygems/commit/fa6e6ea95c
2023-01-31 10:49:08 +09:00
Étienne Barrié 70eedef32a [ruby/reline] Splat is always an Array
https://github.com/ruby/reline/commit/82095bd62b
2023-01-31 09:33:49 +09:00
git 7439ccf0ed * expand tabs. [ci skip]
Please consider using misc/expand_tabs.rb as a pre-commit hook.
2023-01-30 23:43:40 +00:00
Eric Wong 0285aa87f1 file.c: add some endif labels where appropriate
"Appropriate" for me being ifdefs which:

1) span enough lines to be hard-to-follow (I need big fonts to see)

2) nested within other ifdefs, or within large functions
   (I have a short attention span)

rb_file_expand_path_internal is the prime example of a large
function I struggle to understand due to the amount of
platform-specific ifdefs.  Hopefully this helps others with poor
vision and/or short attention spans.
2023-01-30 23:43:15 +00:00
Nobuyoshi Nakada 3a7367ccc3 mkconfig: Map `includedir` only for system ruby
Only when installing to the system path on macOS, prepend '$(SDKROOT)'
and remap `includedir`.
Fix https://github.com/rbenv/ruby-build/discussions/2123
2023-01-31 06:33:16 +09:00
Takashi Kokubun 344c16eba4
Avoid using a weird syntax for documentation
Following up 465bd972ec.

If the actual implementation still resides in C, it should be
documented in C just like all other places.
2023-01-30 13:18:19 -08:00
Takashi Kokubun 006682d391
Avoid leaving an uneeded comment
465bd972ec didn't need to leave the obsoleted code.
2023-01-30 13:12:34 -08:00