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

82617 Коммитов

Автор SHA1 Сообщение Дата
yui-knk 9d3dcb86d1 Check hash key duplication for `__LINE__` and `__FILE__` 2024-01-07 14:32:10 +09:00
S-H-GAMELINKS e4a9a73931 Skip some RBS test 2024-01-07 09:24:34 +09:00
S-H-GAMELINKS 1b8d01136c Introduce Numeric Node's 2024-01-07 09:24:34 +09:00
BurdetteLamar 76afbda5b5 [ruby/net-http] Tweak to Net::HTTP What's Here
https://github.com/ruby/net-http/commit/3bf641ca63
2024-01-06 18:26:38 +00:00
BurdetteLamar 8cad6fc90a Tweak to Integer What's Here 2024-01-06 13:25:17 -05:00
BurdetteLamar 4a44bf8c34 Tweak to Float What's Here 2024-01-06 13:24:48 -05:00
BurdetteLamar 7b615bfdf3 Tweak to Float What's Here 2024-01-06 13:24:48 -05:00
BurdetteLamar 54e8901f66 Tweak for ENV doc 2024-01-06 13:23:27 -05:00
Stan Lo 4bdfc9070c [ruby/irb] Refactor exit command
(https://github.com/ruby/irb/pull/835)

* Remove unnecessary code from the exit command's implementation

1. The parameters of `IRB.irb_exit` were never used. But there are some
   libraries seem to call it with arguments + it's declared on the top-level
   IRB constant. So I changed the params to anonymous splat instead of removing them.
2. `Context#exit` was completely unnecessary as `IRB.irb_exit` doesn't use
   the `@irb` instance it passes. And since it's (or should be treated as)
   a private method, I simply removed it.
3. The `exit` command doesn't use the status argument it receives at all.
   But to avoid raising errors on usages like `exit 1`, I changed the argument to
   anonymous splat instead removing it.

* Make exit an actual command

* Update readme

https://github.com/ruby/irb/commit/452b543a65
2024-01-06 17:15:16 +00:00
Peter Zhu d96fe5e4f8 [DOC] Fix indentation in Numeric#step 2024-01-06 11:43:57 -05:00
Nobuyoshi Nakada e168dbdac5
[DOC] Simply use `--` / `++` instead of `:stopdoc:` / `:startdoc:` 2024-01-07 00:43:56 +09:00
Peter Zhu 0831d960bf [DOC] Fix typo in call-seq for Float#round 2024-01-06 09:34:54 -05:00
Nobuyoshi Nakada 9b78ef7552 [DOC] Load options and parse files from srcdir
RDoc options that do not change and can be written in `.rdoc_options`
file are moved, so that they match when called without `make`.

Get rid of parsing the files in `page_dir` twice (as relative paths
and absolute paths).
2024-01-06 21:19:51 +09:00
Stan Lo 3dac27897e [ruby/irb] Require Reline v0.4.2+
(https://github.com/ruby/irb/pull/834)

https://github.com/ruby/irb/commit/eff8d0d46a
2024-01-06 12:16:12 +00:00
Nobuyoshi Nakada d1de2a34c1 [ruby/rdoc] Rename and move the tests for `--locale` option [ci skip]
https://github.com/ruby/rdoc/commit/b2a35ee39d
2024-01-06 10:23:41 +00:00
Nobuyoshi Nakada f6847e9456 [ruby/rdoc] Ignore `locale` at `write_options`
`@locale` is set from `@locale_name` and loaded from `@locale_dir`
after `write_options`, and `RDoc::I18n::Locale` does not seem to
expected to be loaded.

https://github.com/ruby/rdoc/commit/fd610f7023
2024-01-06 10:17:49 +00:00
Rian McGuire 913b26d0fd Add test case for GC.measure_total_time 2024-01-06 17:36:35 +11:00
Rian McGuire 7db35e10c3 Fix GC.measure_total_time regression
Commit 93ac7405b8 introduced a regression
where measurements would still be taken after setting
GC.measure_total_time = false.

Fixes [Bug #20157]
2024-01-06 17:36:35 +11:00
Nobuyoshi Nakada 4112585be5
Too much nestings make editors confused
Get rid of nested double quotes inside nested interpolations.  Also,
remove comments that are no longer needed by the documents.
2024-01-06 13:47:06 +09:00
yui-knk 54a1236541 Add ruby_debug_print functions to vm_debug.h 2024-01-06 09:32:45 +09:00
yui-knk 0c990994c7 Add a shorthand for ruby_debug_print_node 2024-01-06 09:32:45 +09:00
yui-knk da23f8fe1a Print node id and location by ruby_debug_print_node 2024-01-06 09:32:45 +09:00
Takashi Kokubun 7f9c174102
YJIT: Let RubyVM::YJIT.enable respect --yjit-stats (#9415) 2024-01-05 14:08:57 -05:00
Jeremy Evans 4d03140009 [ruby/net-http] Don't invoke response block more than once due to retry
If a socket error occurs while performing a streaming download via
the response block provided to transport_request, avoid calling
the response block again as this would result in duplicate data
received by the client.

Fixes https://github.com/ruby/net-http/pull/86
Fixes https://github.com/ruby/net-http/pull/87

Fixes [Bug #11526]

https://github.com/ruby/net-http/commit/114d01b092

Co-authored-by: Jeremy Stanley <jeremy@instructure.com>
2024-01-05 16:51:37 +00:00
Jeremy Evans 37657c79b6 [ruby/uri] Make URI#to_s prepend relative path with / if there is a host or port
Otherwise, the path could be considered part of the host or port.

This is better than modifying the path to make it absolute when
a host or port is set.  We could also raise for invalid paths
when a host or port is set using check_path, but that results
in weird errors, and won't catch issues (such as ftp allowing a
relative path).

Fixes [Bug #19916]

https://github.com/ruby/uri/commit/ac32aa005b
2024-01-05 16:07:55 +00:00
git 557f1a5705 Update default gems list at 99933751c1 [ci skip] 2024-01-05 14:33:04 +00:00
Stan Lo 99933751c1 [ruby/reline] Bump version to v0.4.2
(https://github.com/ruby/reline/pull/633)

https://github.com/ruby/reline/commit/5b59e48070
2024-01-05 14:32:18 +00:00
Hiroshi SHIBATA 900fb48e68
Support Feature and Bug tickets for release note generator 2024-01-05 18:29:02 +09:00
git f75302b883 Update bundled gems list at 185abff626 [ci skip] 2024-01-05 09:14:02 +00:00
Hiroshi SHIBATA 185abff626 Use released versions of net-imap and net-smtp 2024-01-05 18:13:34 +09:00
git f4b059610d Update default gems list at 75a8b48fba [ci skip] 2024-01-05 08:25:49 +00:00
Hiroshi SHIBATA 75a8b48fba [ruby/net-http] Bump version to 0.4.1
https://github.com/ruby/net-http/commit/21e226c0bc
2024-01-05 08:25:03 +00:00
git 7b2b1e61ce Update bundled gems list as of 2024-01-05 2024-01-05 06:58:22 +00:00
yui-knk 6d67dfc9ea Add test cases for duplicated `when\' clause warnings
Add test cases for `__LINE__` and `__FILE__` because
they were managed by NODE_LIT and NODE_STR but changed to
be managed by dedicated NODE now.
2024-01-05 12:14:13 +09:00
Martin Emde 098d97e96d [rubygems/rubygems] Quote Etag in `If-None-Match` header of compact index request
https://github.com/rubygems/rubygems/commit/d26bcd7551
2024-01-05 02:06:58 +00:00
Adam Hess 6aacbd690c Free pthread_attr after setting up the thread
[bug #20149]
2024-01-05 08:56:44 +09:00
git dd8157f79f Update default gems list at 5ff1524fde [ci skip] 2024-01-04 22:35:45 +00:00
Takashi Kokubun 5ff1524fde [ruby/erb] Version 4.0.4
https://github.com/ruby/erb/commit/b68bfed6a8
2024-01-04 22:34:59 +00:00
Takashi Kokubun d20c609465 [ruby/erb] Skip building a native extension for JRuby
https://github.com/ruby/erb/commit/f0f68baf6b
2024-01-04 22:33:16 +00:00
BurdetteLamar 10b9679fa6 [ruby/rdoc] Tweaks to Markup Reference
https://github.com/ruby/rdoc/commit/05ac6dba66
2024-01-04 21:27:58 +00:00
Koichi Sasada d65d2fb6b5 Do not `poll` first
Before this patch, the MN scheduler waits for the IO with the
following steps:

1. `poll(fd, timeout=0)` to check fd is ready or not.
2. if fd is not ready, waits with MN thread scheduler
3. call `func` to issue the blocking I/O call

The advantage of advanced `poll()` is we can wait for the
IO ready for any fds. However `poll()` becomes overhead
for already ready fds.

This patch changes the steps like:

1. call `func` to issue the blocking I/O call
2. if the `func` returns `EWOULDBLOCK` the fd is `O_NONBLOCK`
   and we need to wait for fd is ready so that waits with MN
   thread scheduler.

In this case, we can wait only for `O_NONBLOCK` fds. Otherwise
it waits with blocking operations such as `read()` system call.
However we don't need to call `poll()` to check fd is ready
in advance.

With this patch we can observe performance improvement
on microbenchmark which repeats blocking I/O (not
`O_NONBLOCK` fd) with and without MN thread scheduler.

```ruby
require 'benchmark'

f = open('/dev/null', 'w')
f.sync = true

TN = 1
N = 1_000_000 / TN

Benchmark.bm{|x|
  x.report{
    TN.times.map{
      Thread.new{
        N.times{f.print '.'}
      }
    }.each(&:join)
  }
}
__END__
TN = 1
                 user     system      total        real
ruby32       0.393966   0.101122   0.495088 (  0.495235)
ruby33       0.493963   0.089521   0.583484 (  0.584091)
ruby33+MN    0.639333   0.200843   0.840176 (  0.840291) <- Slow
this+MN      0.512231   0.099091   0.611322 (  0.611074) <- Good
```
2024-01-05 05:51:25 +09:00
Peter Zhu 6c252912af Memory leak when duplicating identhash
[Bug #20145]

Before this commit, both copy_compare_by_id and hash_copy will create a
copy of the ST table, so the ST table created in copy_compare_by_id will
be leaked.

    h = { 1 => 2 }.compare_by_identity

    10.times do
      1_000_000.times do
        h.select { false }
      end

      puts `ps -o rss= -p #{$$}`
    end

Before:

    110736
    204352
    300272
    395520
    460704
    476736
    542000
    604704
    682624
    770528

After:

    15504
    16048
    16144
    16256
    16320
    16320
    16752
    16752
    16752
    16752
2024-01-04 11:25:31 -05:00
tomoya ishida 542011ff68 [ruby/reline] Fix pasting tab-indented code crash
(https://github.com/ruby/reline/pull/630)

https://github.com/ruby/reline/commit/90155fd0d9
2024-01-04 11:53:06 +00:00
Hiroshi SHIBATA a4bdf26781
Fix version detection error of net-smtp
https://rubyci.s3.amazonaws.com/freebsd12/ruby-master/log/20240104T083002Z.fail.html.gz
  https://rubyci.s3.amazonaws.com/openbsd-current/ruby-master/log/20240104T073006Z.fail.html.gz
2024-01-04 19:09:38 +09:00
Nobuyoshi Nakada c945a849cb
Skip test depending on bundled gems
Because bundled gems cannot be loaded at test-all, this test which
depends on one of the bundled gems, `rake`, always does nothing except
print an expected warning.
2024-01-04 17:47:26 +09:00
hyuraku 577bc8254e [rubygems/rubygems] remove useless comments from unpack_command.rb
https://github.com/rubygems/rubygems/commit/7576c21295
2024-01-04 00:39:54 +00:00
Peter Zhu 46f7fac878 Free rb_native_thread of main thread
The rb_native_thread gets reported as a memory leak by the macOS leaks
tool:

    $ RUBY_FREE_AT_EXIT=1 leaks -q --atExit -- ./miniruby -e ""
    STACK OF 1 INSTANCE OF 'ROOT LEAK: <calloc in ruby_xcalloc_body>':
    6   dyld                                  0x1818a90e0 start + 2360
    5   miniruby                              0x104730128 main + 88  main.c:58
    4   miniruby                              0x1047d7710 ruby_init + 16  eval.c:102
    3   miniruby                              0x1047d757c ruby_setup + 112  eval.c:83
    2   miniruby                              0x104977278 Init_BareVM + 524  vm.c:4193
    1   miniruby                              0x1047f2478 ruby_xcalloc_body + 176  gc.c:12878
    0   libsystem_malloc.dylib                0x181a67b78 _malloc_zone_calloc_instrumented_or_legacy + 100
    ====
        1 (176 bytes) ROOT LEAK: <calloc in ruby_xcalloc_body 0x126604780> [176]
2024-01-03 15:41:08 -05:00
Benoit Daloze 7304d56236 [ruby/prism] Include field comments in Java source
https://github.com/ruby/prism/commit/4a9389f304
2024-01-03 20:00:18 +00:00
Peter Zhu c7ce2f537f Fix memory leak in setting encodings
There is a memory leak in Encoding.default_external= and
Encoding.default_internal= because the duplicated name is not freed
when overwriting.

    10.times do
      1_000_000.times do
        Encoding.default_internal = nil
      end

      puts `ps -o rss= -p #{$$}`
    end

Before:

     25664
     41504
     57360
     73232
     89168
    105056
    120944
    136816
    152720
    168576

After:

    9648
    9648
    9648
    9680
    9680
    9680
    9680
    9680
    9680
    9680
2024-01-03 13:31:43 -05:00
TSUYUSATO Kitsune a25329e0da [ruby/prism] Fix parsing pinned local variable pattern for numbered parameter
Fix https://github.com/ruby/prism/pull/2094

The part of `parse_variable_call` for variables was split into a new
function `parse_variable` and used it.

https://github.com/ruby/prism/commit/4c5fd1a746
2024-01-03 17:20:33 +00:00