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

76247 Коммитов

Автор SHA1 Сообщение Дата
Samuel Giddins a17b1b19b1 [rubygems/rubygems] Always join with a string
Gem.path_separator can also be a regexp...

https://github.com/rubygems/rubygems/commit/7e6e56a5f3
2023-02-22 08:42:20 +00:00
Samuel Giddins 0ca3a095be [rubygems/rubygems] Only update env if var exists
Will save on an error if it would be nil from an exception happening during that line

https://github.com/rubygems/rubygems/commit/d6797a04e9
2023-02-22 08:42:19 +00:00
Samuel Giddins 616a7e1f6c [rubygems/rubygems] Nil out Gem.configuration after tests
https://github.com/rubygems/rubygems/commit/3135ad91d4
2023-02-22 08:42:19 +00:00
Samuel Giddins ae5deb1ebc [rubygems/rubygems] Use assert_raise instead of assert_raises
For ruby-core compat

https://github.com/rubygems/rubygems/commit/c8f85c91a8
2023-02-22 08:42:19 +00:00
Samuel Giddins 931db21208 [rubygems/rubygems] Add tests covering pre-releases for gem exec
https://github.com/rubygems/rubygems/commit/f6877c29b9
2023-02-22 08:42:18 +00:00
Samuel Giddins 80bfa1b30a [rubygems/rubygems] Fix resetting env in gem exec, and make sure it is set for gem exec gem
https://github.com/rubygems/rubygems/commit/13a6dd4992
2023-02-22 08:42:18 +00:00
Samuel Giddins 2dd9698350 [rubygems/rubygems] Allow gem exec gem
https://github.com/rubygems/rubygems/commit/a767f7b9be
2023-02-22 08:42:17 +00:00
Samuel Giddins 47d4f73ee7 [rubygems/rubygems] Remove platform option for gem exec
Also fix native extensions that load dependencies

https://github.com/rubygems/rubygems/commit/a06f9870c7
2023-02-22 08:42:17 +00:00
Samuel Giddins 612ebd10c0 [rubygems/rubygems] Ensure dependencies are updated by default when running gem exec
https://github.com/rubygems/rubygems/commit/664f3e1e5f
2023-02-22 08:42:16 +00:00
Samuel Giddins 3f0f9a7942 [rubygems/rubygems] Add gem exec description
https://github.com/rubygems/rubygems/commit/dac1609fd5
2023-02-22 08:42:16 +00:00
Samuel Giddins d81be0609b [rubygems/rubygems] Add specs for gem exec
https://github.com/rubygems/rubygems/commit/3078e5834e
2023-02-22 08:42:16 +00:00
Samuel Giddins cbe14cc8e6 [rubygems/rubygems] Add gem exec command
https://github.com/rubygems/rubygems/commit/ca69a317f3
2023-02-22 08:42:15 +00:00
Nobuyoshi Nakada 693e4dec23
Prohibit GIT after setting readonly 2023-02-22 14:40:13 +09:00
小MAO钓鱼 65ef20d2a7
Add support for LoongArch (#7343)
* vm_dump.c: Dump machine registers on loongarch64 Linux.

* coroutines: Support for native loongarch64 coroutines.

---------

Co-authored-by: zangruochen <zangruochen@loongson.cn>
2023-02-22 13:11:33 +09:00
dependabot[bot] 2798b13e33 Bump actions/cache from 3.2.5 to 3.2.6
Bumps [actions/cache](https://github.com/actions/cache) from 3.2.5 to 3.2.6.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](6998d139dd...69d9d449ac)

---
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-22 11:56:36 +09:00
Nobuyoshi Nakada d025ff29c4
Clone bundled gem sources only if GIT is available 2023-02-22 10:23:06 +09:00
Nobuyoshi Nakada ac5a949c2a
Refine exception messages when git failed 2023-02-22 10:23:05 +09:00
Hiroshi SHIBATA 015bf5c461
Removed accidentally commits with ruby/readline-ext
Partly reverted 1ddda4c0d7
2023-02-22 10:20:20 +09:00
Hiroshi SHIBATA fc59b58715 [ruby/readline-ext] test_readline.rb only needs EnvUtil
https://github.com/ruby/readline-ext/commit/9245965ecd
2023-02-22 01:18:26 +00:00
Hiroshi SHIBATA 088919065e [ruby/readline-ext] Omit some tests with macOS platform
https://github.com/ruby/readline-ext/commit/efe2be6e4c
2023-02-22 01:18:25 +00:00
Hiroshi SHIBATA 1ddda4c0d7 [ruby/readline-ext] Import EnvUtils and related test libraries
https://github.com/ruby/readline-ext/commit/f034697a48
2023-02-22 01:18:25 +00:00
eileencodes ae9e1aee59 Call rb_ivar_set instead of exiting for many ivars
Previously, when we have a lot of ivars defined, we would exit via
`jit_chain_guard` for megamorphic ivars. Now if we have more than the
max depth of ivars we can call `rb_ivar_set` instead of exiting.

Using the following script:

```ruby
class A
  def initialize
    @a = 1
  end

  def a
    @a
  end
end

N = 30
N.times do |i|
  eval <<-eorb
class A#{i} < A
  def initialize
    @a#{i} = 1
    super
  end
end
  eorb
end

klasses = N.times.map { Object.const_get(:"A#{_1}") }

1000.times do
  klasses.each do |k|
    k.new.a
  end
end
```

Exits before this change show exits for `setinstancevariable`:

```
***YJIT: Printing YJIT statistics on exit***
method call exit reasons:
    klass_megamorphic:     24,975 (100.0%)
invokeblock exit reasons:
    (all relevant counters are zero)
invokesuper exit reasons:
    (all relevant counters are zero)
leave exit reasons:
    interp_return:     26,948 (100.0%)
     se_interrupt:          1 ( 0.0%)
getblockparamproxy exit reasons:
    (all relevant counters are zero)
getinstancevariable exit reasons:
    megamorphic:     13,986 (100.0%)
setinstancevariable exit reasons:
    megamorphic:     19,980 (100.0%)
opt_aref exit reasons:
    (all relevant counters are zero)
expandarray exit reasons:
    (all relevant counters are zero)
opt_getinlinecache exit reasons:
    (all relevant counters are zero)
invalidation reasons:
    (all relevant counters are zero)
num_send:                    155,823
num_send_known_class:              0 ( 0.0%)
num_send_polymorphic:        119,880 (76.9%)
bindings_allocations:              0
bindings_set:                      0
compiled_iseq_count:              36
compiled_block_count:            158
compiled_branch_count:           240
block_next_count:                 10
defer_count:                      70
freed_iseq_count:                  0
invalidation_count:                0
constant_state_bumps:              0
inline_code_size:             29,216
outlined_code_size:           27,948
freed_code_size:                   0
code_region_size:             65,536
live_context_size:             8,322
live_context_count:              219
live_page_count:                   4
freed_page_count:                  0
code_gc_count:                     0
num_gc_obj_refs:                 130
object_shape_count:              295
side_exit_count:              58,942
total_exit_count:             85,890
yjit_insns_count:          1,023,581
avg_len_in_yjit:                11.2
Top-4 most frequent exit ops (100.0% of exits):
    opt_send_without_block:     24,975 (42.4%)
       setinstancevariable:     19,980 (33.9%)
       getinstancevariable:     13,986 (23.7%)
		     leave:          1 ( 0.0%)
```

Exits after this change show we have no exits for `setinstancevariable`.

```
***YJIT: Printing YJIT statistics on exit***
method call exit reasons:
    klass_megamorphic:     24,975 (100.0%)
invokeblock exit reasons:
    (all relevant counters are zero)
invokesuper exit reasons:
    (all relevant counters are zero)
leave exit reasons:
    interp_return:     60,912 (100.0%)
     se_interrupt:          3 ( 0.0%)
getblockparamproxy exit reasons:
    (all relevant counters are zero)
getinstancevariable exit reasons:
    (all relevant counters are zero)
setinstancevariable exit reasons:
    (all relevant counters are zero)
opt_aref exit reasons:
    (all relevant counters are zero)
expandarray exit reasons:
    (all relevant counters are zero)
opt_getinlinecache exit reasons:
    (all relevant counters are zero)
invalidation reasons:
    (all relevant counters are zero)
num_send:                    155,823
num_send_known_class:              0 ( 0.0%)
num_send_polymorphic:        119,880 (76.9%)
bindings_allocations:              0
bindings_set:                      0
compiled_iseq_count:              36
compiled_block_count:            179
compiled_branch_count:           240
block_next_count:                 11
defer_count:                      70
freed_iseq_count:                  0
invalidation_count:                0
constant_state_bumps:              0
inline_code_size:             31,032
outlined_code_size:           29,708
freed_code_size:                   0
code_region_size:             65,536
live_context_size:             8,360
live_context_count:              220
live_page_count:                   4
freed_page_count:                  0
code_gc_count:                     0
num_gc_obj_refs:                 130
object_shape_count:              295
side_exit_count:              24,978
total_exit_count:             85,890
yjit_insns_count:          1,076,966
avg_len_in_yjit:                12.2
Top-2 most frequent exit ops (100.0% of exits):
    opt_send_without_block:     24,975 (100.0%)
		     leave:          3 ( 0.0%)
```

Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
2023-02-21 13:59:54 -08:00
Alan Wu 9f8056a7dd
YJIT: Fastpath for Module#=== (#7351)
Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>
Co-authored-by: Jimmy Miller <jimmy.miller@shopify.com>
2023-02-21 16:41:23 -05:00
Takashi Kokubun 0353277b20
YJIT: Avoid checking symbol ID twice on send (#7350) 2023-02-21 16:10:10 -05:00
Stan Lo 50e77b6a9c [ruby/irb] Improve RubyLex's tests
(https://github.com/ruby/irb/pull/484)

* Improve assert_indenting helper

Instead of putting assertions inside the `auto_indent` block, we
can just make `auto_indent` return the calculated space count, and use
it for assertion outside of the `auto_indent` block call.

This simplifies the setup code and makes the intention easier to
understand.

* Introduce assert_row_indenting helper

1. Helper users shouldn't need to write 2 assertions for the current and
   the next line's indentation.
2. With this new approach, we can generate clearer error message for
   both cases:

When the current line's space count doesn't match

```
  Incorrect spaces calculation for line:

  ```
> def each_top_level_statement
  ```

  All lines:

  ```
  def each_top_level_statement
  ```

<0> expected but was
<nil>
```

When the next line's space count doesn't match

```
  Incorrect spaces calculation for line after the current line:

  ```
  def each_top_level_statement
>
  ```

  All lines:

  ```
  def each_top_level_statement
  ```

<3> expected but was
<2>
```

* Replace assert_indenting with assert_row_indenting
2023-02-21 19:38:09 +00:00
Jimmy Miller 5baef07506
YJIT: Fix clippy issues and remove unused params (#7348)
* YJIT: Fix clippy issues and remove unused params

* Remove an unnecessary whitespace

---------

Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
2023-02-21 13:21:25 -05:00
Takashi Kokubun d579f47558
Bump SHAPE_MAX_NUM_IVS to 80 (#7344) 2023-02-21 10:00:39 -08:00
Nobuyoshi Nakada 37b6d98840 Use `Gem::Package#build` instead of the class method for old baseruby 2023-02-22 02:07:59 +09:00
Nobuyoshi Nakada 289080e4d8 Clone and create dummy gemspec in sequential build 2023-02-22 02:07:59 +09:00
Nobuyoshi Nakada 241c4cfdd4 Move dummy gemspec file creation for extract-gems-sequential 2023-02-22 02:07:59 +09:00
Nobuyoshi Nakada 0a9efe8701 Use git directories instead of gemspec files as dependency
Minitest repository does not commit its gemspec file.
2023-02-22 02:07:59 +09:00
Matt Valentine-House 3c01342e19 Fix detection of compiler_wd in tool/update-deps 2023-02-21 10:57:28 -05:00
Nobuyoshi Nakada a26a0af074
Use `BigDecimal::VERSION` instead of `RUBY_VERSION` 2023-02-22 00:39:56 +09:00
git ace116fceb Update default gems list at 0cde887eb9 [ci skip] 2023-02-21 15:36:48 +00:00
Nobuyoshi Nakada 0cde887eb9 [ruby/bigdecimal] Bump up to 3.1.4
ruby/bigdecimal#187 has changed a behavior and ruby/spec also needed a
follow up at https://github.com/ruby/ruby/commit/0d8ef62fc293.
However, because bigdecimal is a separate gem and can be updated in
older versions of ruby, `RUBY_VERSION` is not appropriate for this
guard.  That means it needs bumped up `BigDecimal::VERSION`.

https://github.com/ruby/bigdecimal/commit/3a2a7a9353
2023-02-21 15:35:40 +00:00
Benoit Daloze 7b768e4335 [ruby/bigdecimal] Move RB_GC_GUARD() at the end, like in BigMath_s_exp()
https://github.com/ruby/bigdecimal/commit/b66ef9fbb5
2023-02-21 14:24:13 +00:00
Benoit Daloze 5077cc2be6 [ruby/bigdecimal] Avoid RB_GC_GUARD(a) = b in bigdecimal
* This is not supported on TruffleRuby, which requires the value to be
  set before RB_GC_GUARD() is called.
* See https://github.com/oracle/truffleruby/pull/2879

https://github.com/ruby/bigdecimal/commit/7b2957922f
2023-02-21 14:24:12 +00:00
Peter Zhu 93ac7405b8 Add marking and sweeping time to GC.stat
There is a `time` key in GC.stat that gives us the total time spent in
GC. However, we don't know what proportion of the time is spent between
marking and sweeping. This makes it difficult to tune the GC as we're
not sure where to focus our efforts on.

This PR adds keys `marking_time` and `sweeping_time` to GC.stat for the
time spent marking and sweeping, in milliseconds.

[Feature #19437]
2023-02-21 08:05:31 -05:00
Peter Zhu d7c1ca48bf Refactor to separate marking and sweeping phases
This commit separates the marking and sweeping phases so that marking
functions do not directly call sweeping functions.
2023-02-21 08:05:31 -05:00
Jean Boussier d2520b7b76 Marshal.load: restore instance variables on Regexp
[Bug #19439]

The instance variables were restore on the Regexp source,
not the regexp itself.

Unfortunately we have a bit of a chicken and egg problem.

The source holds the encoding, and the encoding need to be set on
the source to be able to instantiate the Regexp.

So the instance variables have to be read on the `source`.
To correct this we transfert the instance variables after
instantiating the Regexp.

The only way to avoid this would be to read the instance variable
twice and rewind.
2023-02-21 13:57:04 +01:00
git 61709227bb Update default gems list at b572f2436c [ci skip] 2023-02-21 11:00:14 +00:00
Charles Oliver Nutter b572f2436c
[ruby/openssl] Stub gemspec for JRuby
JRuby has its own implementation of the `openssl` library in
jruby-openssl. The simplest way for us to allow users to set
openssl as a gem dependency is to ship a stub gem that just
depends on jruby-openssl. This patch adds that to the gemspec.
Additional work may be required to fit this stub gem into the test
and release process.

See #20 for more details.

https://github.com/ruby/openssl/commit/74ccaa5e18
2023-02-21 19:50:49 +09:00
Étienne Barrié bc101f0fc1 [ruby/rdoc] Fix RDoc::Parser::Ruby not being documented
The calls to require prevent the class from being documented.

https://github.com/ruby/rdoc/commit/76283fc42e
2023-02-21 19:32:14 +09:00
Charles Oliver Nutter 4c7726516c [ruby/strscan] Mask out this test on JRuby/Windows
See https://github.com/jruby/jruby/issues/7644 for the root issue,
which will require fixes to JRuby's regular expression engine,
JOni.

https://github.com/ruby/strscan/commit/29a65abff2
2023-02-21 19:31:39 +09:00
Sutou Kouhei 76a4cdfb02 [ruby/strscan] test: Run test more with fixed anchor mode
(https://github.com/ruby/strscan/pull/60)

fix https://github.com/ruby/strscan/pull/56
2023-02-21 19:31:38 +09:00
OKURA Masafumi 260bc7cdfa [ruby/strscan] Add test case to `test_string`
(https://github.com/ruby/strscan/pull/58)

`string` returns the original string after `scan` is called. Current
test doesn't check this behavior and now it's covered.
2023-02-21 19:31:38 +09:00
Sutou Kouhei 18e840ac60 [ruby/strscan] Bump version
https://github.com/ruby/strscan/commit/681cde0f27
2023-02-21 19:31:36 +09:00
OKURA Masafumi a44f5ab089 [ruby/strscan] Mention return value of `rest?` in the doc
(https://github.com/ruby/strscan/pull/49)

The doc of `rest?` was unclear about return value. This commit adds the
return value to the doc.
2023-02-21 19:31:35 +09:00
Sutou Kouhei a350ef9f7a [ruby/csv] test: use mailing list ID instead of unavailable URL
https://github.com/ruby/csv/commit/04862ccf87
2023-02-21 19:31:29 +09:00
Vivek Bharath Akupatni 2ac1efc0f3 [ruby/csv] Use https links instead of http
(https://github.com/ruby/csv/pull/274)

https://github.com/ruby/csv/commit/e2a06929a8
2023-02-21 19:31:29 +09:00