Commit graph

16692 commits

Author SHA1 Message Date
Hiroshi SHIBATA
1a60012612 [rubygems/rubygems] util/rubocop -A --only Lint/RescueException
e8a5db50af
2023-03-23 17:18:49 +09:00
Nobuyoshi Nakada
348412c7fa [rubygems/rubygems] Use indented heredoc
085d2776d8
2023-03-22 21:21:08 +00:00
Aaron Patterson
7c307e0379 Lazily allocate id tables for children
This patch lazily allocates id tables for shape children.  If a shape
has only one single child, it tags the child with a bit.  When we read
children, if the id table has the bit set, we know it's a single child.
If we need to add more children, then we create a new table and evacuate
the child to the new table.

Co-Authored-By: Matt Valentine-House <matt@eightbitraptor.com>
2023-03-22 12:50:42 -07:00
Hiroshi SHIBATA
aa5d195712 [rubygems/rubygems] @orig_RUBY_ENGINE is always provided now
c5e8ad4823
2023-03-22 11:17:26 +00:00
Hiroshi SHIBATA
1697869500 [rubygems/rubygems] Fix test failure with missing RUBY_REVISION constants
c5b80945c6
2023-03-22 11:17:26 +00:00
Hiroshi SHIBATA
3725850297 [rubygems/rubygems] ditto: RUBY_ENGINE_VERSION
dc82ebeac6
2023-03-22 11:17:25 +00:00
Hiroshi SHIBATA
3dc4bc313f [rubygems/rubygems] RUBY_REVISION is also provided by supported platforms
71a237aeec
2023-03-22 11:17:25 +00:00
Hiroshi SHIBATA
ea1dcb3e23 [rubygems/rubygems] RUBY_DESCRIPTION is always provided by supported platforms
8a7028bc7e
2023-03-22 11:17:24 +00:00
Hiroshi SHIBATA
92f78b0e0b [rubygems/rubygems] Fixup
https://github.com/rubygems/rubygems/pull/6486

ad50221acf
2023-03-22 11:17:24 +00:00
Hiroshi SHIBATA
8c00b130a4
Fixup 43d20596b8 2023-03-22 18:07:40 +09:00
Hiroshi SHIBATA
43d20596b8
Relax timeout limit for FreeBSD
* 20230322T063002Z.fail.html.gz
  * 20230322T063002Z.fail.html.gz
2023-03-22 16:32:23 +09:00
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)

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'

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
97f062be05
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA
ab644ae497 [rubygems/rubygems] util/rubocop -A --only Style/CharacterLiteral
aa058ff6b8
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA
72d09a568f [rubygems/rubygems] util/rubocop -A --only Style/RedundantBegin
b595d3cf0f
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA
ee7475734f [rubygems/rubygems] util/rubocop -A --only Style/BarePercentLiterals
02d8147243
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA
f4b073ef7a [rubygems/rubygems] util/rubocop -A --only Style/UnlessElse
184c03270c
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA
4868cfcf1d [rubygems/rubygems] util/rubocop -A --only Style/IdenticalConditionalBranches
64f437a428
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA
6ad269dc39 [rubygems/rubygems] util/rubocop -A --only Style/RescueStandardError
80b57da926
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA
70164eec0f [rubygems/rubygems] util/rubocop -A --only Style/RescueModifier
b490379eab
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA
38664ede7e [rubygems/rubygems] util/rubocop -A --only Style/NonNilCheck
2b056b25c3
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA
4cd8a46f45 [rubygems/rubygems] util/rubocop -A --only Style/ParenthesesAroundCondition
c766a65885
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA
4ab23df2c4 [rubygems/rubygems] util/rubocop -A --only Style/RedundantParentheses
295691d4dc
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA
b8914a9d5d [rubygems/rubygems] util/rubocop -A --only Style/StabbyLambdaParentheses
23ce9793e5
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA
d8c5fa963f [rubygems/rubygems] util/rubocop -A --only Style/YodaCondition
3594945391
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA
66bd2c1a1c [rubygems/rubygems] util/rubocop -A --only Style/CommentAnnotation
4e77a1d1d5
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA
52ea7afa5f [rubygems/rubygems] util/rubocop -A --only Style/NegatedIf
aa95ee27a2
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA
9ab860f9af [rubygems/rubygems] util/rubocop -A --only Style/ColonMethodCall
823113f39e
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA
bd57322bfe [rubygems/rubygems] util/rubocop -A --only Style/DefWithParentheses
91391ceedf
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA
03b82d1865 [rubygems/rubygems] util/rubocop -A --only Style/SingleLineMethods
fa2e835ed2
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA
d2cebb4e31 [rubygems/rubygems] util/rubocop -A --only Style/NumericLiterals
860669b08a
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA
712d6e675b [rubygems/rubygems] util/rubocop -A --only Style/RedundantInterpolation
add44e56eb
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA
0b632b9cdd [rubygems/rubygems] util/rubocop -A --only Style/ClassCheck
1c3356a872
2023-03-17 18:50:55 +09:00