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

16681 Коммитов

Автор SHA1 Сообщение Дата
dependabot[bot] 65a725633b [rubygems/rubygems] Bump rb-sys
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.67 to 0.9.68.
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.67...v0.9.68)

---
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-03-22 03:25:47 +00:00
Alan Wu 08eaf7c5fa
YJIT: Fix deadlock in tests due to pipe capacity
Previously, when there is enough stats that the child process fills up
the pipe capacity, the child process would block, with the parent
process waiting forever as no one is reading to clear up the pipe. The
test timed out in these situations.

Use a separate thread in the parent to read from the pipe to unblock the
child in these situation. EnvUtil also does this for handling stdout and
stderr.

I had the test suite deadlock on a Linux VM.
2023-03-21 18:16:33 -04:00
Phillip Hellewell f67f0d7268 [ruby/reline] Add key bindings for PgUp and PgDn
(https://github.com/ruby/reline/pull/509)

* Add key bindings for PgUp, PgDn

* Match behavior of readline 8.2

In the latest readline (8.2), page-up and page-down are bound to
history-search-backward and history-search-forward by default.

We would like reline to have the same default behavior.
2023-03-21 14:48:32 +00:00
Nobuyoshi Nakada 9b85ff01a1
Use indented heredoc 2023-03-21 22:59:09 +09:00
Aaron Patterson 54dbd8bea8 Use an st table for "too complex" objects
st tables will maintain insertion order so we can marshal dump / load
objects with instance variables in the same order they were set on that
particular instance

[ruby-core:112926] [Bug #19535]

Co-Authored-By: Jemma Issroff <jemmaissroff@gmail.com>
2023-03-20 13:54:18 -07:00
Jean Boussier 1db8951d3a Cache `Process.pid`
[Feature #19443]

It's not uncommon for database client and similar network libraries
to protect themselves from Process.fork by regularly checking Process.pid

Until recently most libc would cache `getpid()` so this was a cheap
check to make.

However as of glibc version 2.25 the PID cache is removed and calls to
`getpid()` always invoke the actual system call which significantly degrades
the performance of existing applications.

The reason glibc removed the cache is that some libraries were bypassing
`fork(2)` by issuing system calls themselves, causing stale cache issues.

That isn't a concern for Ruby as bypassing MRI's primitive for forking
would render the VM unusable, so we can safely cache the PID.
2023-03-20 08:21:23 +00:00
Takashi Kokubun 2f29044de4 RJIT: Optimize Kernel#block_given? 2023-03-19 14:15:45 -07:00
Takashi Kokubun 2121282753 RJIT: Optimize String#<< 2023-03-19 13:25:41 -07:00
Nobuyoshi Nakada 67dd52d59c
[Bug #19539] Match heredoc identifier from end of line
Not to ignore leading spaces in indented heredoc identifier.
2023-03-19 01:35:21 +09:00
tomoya ishida e8e7ff1333 [ruby/reline] Fix: line longer than terminal width breaks rendering
(https://github.com/ruby/reline/pull/516)

https://github.com/ruby/reline/commit/ae5f9b87ab
2023-03-18 14:37:10 +00:00
Peter Zhu cb22d78354 Fix frozen status loss when moving objects
[Bug #19536]

When objects are moved between size pools, their frozen status is lost
in the shape. This will cause the frozen check to be bypassed when there
is an inline cache. For example, the following script should raise a
FrozenError, but doesn't on Ruby 3.2 and master.

    class A
      def add_ivars
        @a = @b = @c = @d = 1
      end

      def set_a
        @a = 10
      end
    end

    a = A.new
    a.add_ivars
    a.freeze

    b = A.new
    b.add_ivars
    b.set_a # Set the inline cache in set_a

    GC.verify_compaction_references(expand_heap: true, toward: :empty)

    a.set_a
2023-03-18 09:07:05 -04:00
Josef Haider 2c8f2871a8
Fix handling of 6-byte codepoints in left_adjust_char_head in CESU-8 encoding 2023-03-18 15:43:54 +09:00
Jean Boussier 3592b24cdc ObjectSpace::WeakMap: clean inverse reference when an entry is re-assigned
[Bug #19531]

```ruby
wmap[1] = "A"
wmap[1] = "B"
```

In the example above, we need to remove the `"A" => 1` inverse reference
so that when `"A"` is GCed the `1` key isn't deleted.
2023-03-17 17:50:08 +00:00
Nobuyoshi Nakada ccd2dbc4c1 core_assertions.rb: Relax `assert_linear_performance`
* Use an `Enumerable` as factors, instead of three arguments.

* Include `assert_operator` time in rehearsal time.

* Round up max expected time.
2023-03-18 02:41:02 +09:00
lukeg 418cf344fb [ruby/irb] Fix 2 minor issues in test suite
* undefine Kernel#irb_original_require in without_rdoc method
* Don't rescue all LoadErrors/NameErrors in test_rendering.rb, just
the one for require 'yamatanooroti'

https://github.com/ruby/irb/commit/52b79806ea
2023-03-17 15:19:40 +00:00
Hiroshi SHIBATA f8fe151ca9 util/rubocop -A --only Style/TernaryParentheses 2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 5211900d37 util/rubocop -A --only Style/SymbolProc 2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 0373615948 util/rubocop -A --only Layout/SpaceInsideArrayLiteralBrackets 2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 866831d8e9 [rubygems/rubygems] util/rubocop -A --only Style/Semicolon
https://github.com/rubygems/rubygems/commit/97f062be05
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA ab644ae497 [rubygems/rubygems] util/rubocop -A --only Style/CharacterLiteral
https://github.com/rubygems/rubygems/commit/aa058ff6b8
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 72d09a568f [rubygems/rubygems] util/rubocop -A --only Style/RedundantBegin
https://github.com/rubygems/rubygems/commit/b595d3cf0f
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA ee7475734f [rubygems/rubygems] util/rubocop -A --only Style/BarePercentLiterals
https://github.com/rubygems/rubygems/commit/02d8147243
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA f4b073ef7a [rubygems/rubygems] util/rubocop -A --only Style/UnlessElse
https://github.com/rubygems/rubygems/commit/184c03270c
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 4868cfcf1d [rubygems/rubygems] util/rubocop -A --only Style/IdenticalConditionalBranches
https://github.com/rubygems/rubygems/commit/64f437a428
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 6ad269dc39 [rubygems/rubygems] util/rubocop -A --only Style/RescueStandardError
https://github.com/rubygems/rubygems/commit/80b57da926
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 70164eec0f [rubygems/rubygems] util/rubocop -A --only Style/RescueModifier
https://github.com/rubygems/rubygems/commit/b490379eab
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 38664ede7e [rubygems/rubygems] util/rubocop -A --only Style/NonNilCheck
https://github.com/rubygems/rubygems/commit/2b056b25c3
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 4cd8a46f45 [rubygems/rubygems] util/rubocop -A --only Style/ParenthesesAroundCondition
https://github.com/rubygems/rubygems/commit/c766a65885
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 4ab23df2c4 [rubygems/rubygems] util/rubocop -A --only Style/RedundantParentheses
https://github.com/rubygems/rubygems/commit/295691d4dc
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA b8914a9d5d [rubygems/rubygems] util/rubocop -A --only Style/StabbyLambdaParentheses
https://github.com/rubygems/rubygems/commit/23ce9793e5
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA d8c5fa963f [rubygems/rubygems] util/rubocop -A --only Style/YodaCondition
https://github.com/rubygems/rubygems/commit/3594945391
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 66bd2c1a1c [rubygems/rubygems] util/rubocop -A --only Style/CommentAnnotation
https://github.com/rubygems/rubygems/commit/4e77a1d1d5
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 52ea7afa5f [rubygems/rubygems] util/rubocop -A --only Style/NegatedIf
https://github.com/rubygems/rubygems/commit/aa95ee27a2
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 9ab860f9af [rubygems/rubygems] util/rubocop -A --only Style/ColonMethodCall
https://github.com/rubygems/rubygems/commit/823113f39e
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA bd57322bfe [rubygems/rubygems] util/rubocop -A --only Style/DefWithParentheses
https://github.com/rubygems/rubygems/commit/91391ceedf
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 03b82d1865 [rubygems/rubygems] util/rubocop -A --only Style/SingleLineMethods
https://github.com/rubygems/rubygems/commit/fa2e835ed2
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA d2cebb4e31 [rubygems/rubygems] util/rubocop -A --only Style/NumericLiterals
https://github.com/rubygems/rubygems/commit/860669b08a
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 712d6e675b [rubygems/rubygems] util/rubocop -A --only Style/RedundantInterpolation
https://github.com/rubygems/rubygems/commit/add44e56eb
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 0b632b9cdd [rubygems/rubygems] util/rubocop -A --only Style/ClassCheck
https://github.com/rubygems/rubygems/commit/1c3356a872
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 567db6064b [rubygems/rubygems] util/rubocop -A --only Style/NestedParenthesizedCalls
https://github.com/rubygems/rubygems/commit/a875fdb535
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 3d4c3f9e4f [rubygems/rubygems] util/rubocop -A --only Style/ParallelAssignment
https://github.com/rubygems/rubygems/commit/5c88c77873
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 4bb5ce8188 [rubygems/rubygems] util/rubocop -A --only Style/StringLiteralsInInterpolation
https://github.com/rubygems/rubygems/commit/cb554f6eb7
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 83f9aa8f02 [rubygems/rubygems] util/rubocop -A --only Style/Alias
https://github.com/rubygems/rubygems/commit/fba6e94de9
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA ae81ff0c9b [rubygems/rubygems] util/rubocop -A --only Layout/MultilineBlockLayout
https://github.com/rubygems/rubygems/commit/9aa6101942
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 26d6604343 [rubygems/rubygems] util/rubocop -A --only Layout/MultilineMethodCallBraceLayout
https://github.com/rubygems/rubygems/commit/acb0548bf6
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 41f304d5bf [rubygems/rubygems] util/rubocop -A --only Layout/SpaceInsideStringInterpolation
https://github.com/rubygems/rubygems/commit/a06f8ae3bb
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 3233b1fe3f [rubygems/rubygems] util/rubocop -A --only Layout/SpaceInLambdaLiteral
https://github.com/rubygems/rubygems/commit/e76088b699
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA f8daae91c4 [rubygems/rubygems] util/rubocop -A --only Layout/SpaceBeforeSemicolon
https://github.com/rubygems/rubygems/commit/c92c6d8e85
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 4b285e5c6f [rubygems/rubygems] util/rubocop -A --only Layout/AssignmentIndentation
https://github.com/rubygems/rubygems/commit/8e64298989
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 9ffd73523d [rubygems/rubygems] util/rubocop -A --only Layout/EmptyLinesAroundExceptionHandlingKeywords
https://github.com/rubygems/rubygems/commit/ad1fe68d97
2023-03-17 18:50:55 +09:00