74493 Commits

Author SHA1 Message Date
Nobuyoshi Nakada
2f7d2662dd
Control non-parallel parts with .WAIT if available 2022-11-13 23:54:43 +09:00
Kenta Murata
8d82f4ba1c [ruby/bigdecimal] Add specific value allocators
* Add NewZero* and NewOne* function families
* Use them instead of VpAlloc for allocating 0 and 1

https://github.com/ruby/bigdecimal/commit/9276a94ac7
2022-11-13 12:33:29 +00:00
Nobuyoshi Nakada
70c9d5b504
Try to overwrite the file in VPATH if possible 2022-11-13 18:05:11 +09:00
Nobuyoshi Nakada
66529eef88
Force to update revision.h when commits differ 2022-11-13 17:38:44 +09:00
Takashi Kokubun
18fa7059e8
Deal with different Ruby versions 2022-11-12 22:15:40 -08:00
Kenta Murata
802dce4acd [ruby/bigdecimal] Add and use specific value allocators
* Add rbd_allocate_struct_zero for making 0.0
* Add rbd_allocate_struct_one for making 1.0
* Use them to replace VpAlloc calls
* Renmae VpPt5 to VpConstPt5

https://github.com/ruby/bigdecimal/commit/40c826f5e6
2022-11-13 06:01:27 +00:00
Kenta Murata
019f53de5c [ruby/bigdecimal] Make VPrint function always available
https://github.com/ruby/bigdecimal/commit/5391f7e92c
2022-11-13 06:01:27 +00:00
Takashi Kokubun
c0735d1d72
Fix a CI failure in bigdecimal 2022-11-12 21:55:00 -08:00
Kenta Murata
d1f55dea86 [ruby/bigdecimal] Tweak VpAlloc
* Stop reusing mx and mf
* Check szVal == NULL first
* Treat special values before checking the leading `#`

https://github.com/ruby/bigdecimal/commit/14f3d965f8
2022-11-13 04:29:19 +00:00
Kenta Murata
bbb9f72353 [ruby/bigdecimal] Rewrite allocation functions
* Rename them
* Make allocation count operations atomic

https://github.com/ruby/bigdecimal/commit/a5ab34a115
2022-11-13 03:47:40 +00:00
Kenta Murata
2703410289 [ruby/bigdecimal] Twak GetPrecisionInt and rename it to check_int_precision
https://github.com/ruby/bigdecimal/commit/69d0588a3b
2022-11-13 02:46:42 +00:00
Kenta Murata
ef1c6109b1 [ruby/bigdecimal] Tweak check_rounding_mode_option
https://github.com/ruby/bigdecimal/commit/e1c6c9be25
2022-11-13 02:02:02 +00:00
Kenta Murata
74c6e6e565 [ruby/bigdecimal] Rewrite check_rounding_mode function
Use table-lookup algorithm instead of consecutive if-statements.

https://github.com/ruby/bigdecimal/commit/23eaff3ae5
2022-11-13 02:02:01 +00:00
Kenta Murata
b89769b978 [ruby/bigdecimal] [Doc] Fix the document of n_significant_digits
https://github.com/ruby/bigdecimal/commit/91b72a9341
2022-11-13 02:02:00 +00:00
Kenta Murata
977aac057f [ruby/bigdecimal] Make GetVpValue inline
https://github.com/ruby/bigdecimal/commit/1b642e2e59
2022-11-13 02:02:00 +00:00
Kenta Murata
0d5248673d [ruby/bigdecimal] Make BigDecimal_double_fig inline
https://github.com/ruby/bigdecimal/commit/4ecf04da7a
2022-11-13 02:01:59 +00:00
Hiroshi SHIBATA
0a9d51ee9d Migrate our resolver engine to PubGrub
https://github.com/rubygems/rubygems/pull/5960

  Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
2022-11-12 07:40:31 +09:00
Stan Lo
14a1394bcd [ruby/irb] Simplify info command's tests
(https://github.com/ruby/irb/pull/440)

https://github.com/ruby/irb/commit/5942949226
2022-11-11 21:05:35 +00:00
Burdette Lamar
a48e01ccba [ruby/net-http] Update lib/net/http.rb
https://github.com/ruby/net-http/commit/16d042fad6

Co-authored-by: Peter Zhu <peter@peterzhu.ca>
2022-11-11 17:05:29 +00:00
BurdetteLamar
4d9ada223b [ruby/net-http] Prettify class hierarchies in Net::HTTP
https://github.com/ruby/net-http/commit/4a5732e210
2022-11-11 17:05:28 +00:00
Alan Wu
04c5adf806 YJIT: Fix staying in invalidated code after proc calls
Previously, there is no instruction boundary patch point after
the call to a non-leaf C function we generate for
OPTIMIZED_METHOD_TYPE_CALL. This meant that if code GC is triggered
while inside the C function, we would keep running invalidated code when
we return from the C function. This had the effect of running
stale branch stubs, jumping to bad code, etc.

Use jit_prepare_routine_call() to make sure we exit from the invalidated
region as soon as possible after the C call in case of invalidation.
2022-11-11 11:13:07 -05:00
Hiroshi SHIBATA
90bbc891b1 Enable only master-branch 2022-11-11 21:12:56 +09:00
Hiroshi SHIBATA
5a1ddc486b Test with topic-branch 2022-11-11 21:12:56 +09:00
Hiroshi SHIBATA
800caf4ee1 Use secrets.SCORECARD_READ_TOKEN 2022-11-11 21:12:56 +09:00
Hiroshi SHIBATA
a0fcbce415 Try to use ossf/scorecards 2022-11-11 21:12:56 +09:00
Hiroshi SHIBATA
28611be6ee Merge RubyGems/Bundler master from ee2f8398324af4bc1b95f7565ce2fda98126e026 v3_2_0_preview3 2022-11-11 17:24:08 +09:00
Josef Šimánek
de159c5a85 [rubygems/rubygems] Store last check even when upgrade is not available and fix test.
https://github.com/rubygems/rubygems/commit/bcffc2b0a5
2022-11-11 17:24:08 +09:00
Josef Šimánek
7ce0f81fbb [rubygems/rubygems] Use file in XDG_STATE_HOME directory to store last update check timestamp.
https://github.com/rubygems/rubygems/commit/0fbc4ace8a
2022-11-11 17:24:08 +09:00
Josef Šimánek
c7d043065c [rubygems/rubygems] Add 'call for update' to RubyGems install command.
https://github.com/rubygems/rubygems/commit/05811f8248
2022-11-11 17:24:08 +09:00
Jason Karns
ceeefb5870 [rubygems/rubygems] github source should default to secure protocol
Bundler 2 switched to secure https here c2e81f8ff6

Insecure protocols should be avoided to prevent MITM attacks.

https://github.com/rubygems/rubygems/commit/758413364a
2022-11-11 17:24:08 +09:00
Yusuke Endoh
adfbee85e0 Allow a float error for Regexp.timeout
The tests failed on windows

https://github.com/ruby/ruby/actions/runs/3440997073/jobs/5740085169#step:18:62
```
    1) Failure:
  TestRegexp#test_s_timeout [D:/a/ruby/ruby/src/test/ruby/test_regexp.rb:1586]:
  <0.30000000000000004> expected but was
  <0.3>.

    2) Failure:
  TestRegexp#test_timeout_shorter_than_global [D:/a/ruby/ruby/src/test/ruby/test_regexp.rb:1631]:
  <0.30000000000000004> expected but was
  <0.3>.
```
2022-11-11 09:07:00 +09:00
Jun Aruga
4c554096bf wasm/README.md: Add a note about the Ruby built for wasm. [ci skip]
The Ruby built for wasm cannot be execute without a WebAssembly runtime.

```
$ ruby-wasm32-wasi/usr/local/bin/ruby -e 'puts "a"'
bash: ruby-wasm32-wasi/usr/local/bin/ruby: cannot execute binary file: Exec format error
```

Because the Ruby's file type is different from the one built normally, that is
the `/usr/local/ruby-3.2.0-preview2/bin/ruby` below.

```
$ file ruby-wasm32-wasi/usr/local/bin/ruby
ruby-wasm32-wasi/usr/local/bin/ruby: WebAssembly (wasm) binary module version 0x1 (MVP)

$ file /usr/local/ruby-3.2.0-preview2/bin/ruby
/usr/local/ruby-3.2.0-preview2/bin/ruby: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=a37822085e285c0971159982e7642dda88cea606, for GNU/Linux 3.2.0, with debug_info, not stripped
```
2022-11-11 07:57:25 +09:00
Takashi Kokubun
8fa83fa0b2 [ruby/irb] Transform ls's --grep/-G option to keyword args
(https://github.com/ruby/irb/pull/437)

* Transform ls's --grep/-G option to keyword args

* Make --grep less flexible

* Support -g instead of --grep

* Suppress warnings from symbol aliases
2022-11-10 22:55:15 +00:00
Yusuke Endoh
d5513da01d [rubygems/rubygems] Update bundler/spec/bundler/shared_helpers_spec.rb
https://github.com/rubygems/rubygems/commit/8b1481ba77

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2022-11-10 22:45:31 +00:00
Yusuke Endoh
b5f809c496 [rubygems/rubygems] Load "bundler/setup" in lib/rubygems.rb
Ruby interpreter loads some special gems at startup: did_you_mean,
error_highlight, and syntax_suggest. These gems are loaded before
`bundler/setup` is loaded by `RUBYOPT=-rbundler/setup`.
So, the versions of the gems are not controllable by Gemfile.

This change will `require "bundler/setup"` in rubygems.rb (i.e., before
the special gems are loaded). Now `bundle exec` sets an environment
variable `BUNDLER_SETUP`, and rubygems requires the variable if defined.

See also: https://bugs.ruby-lang.org/issues/19089

https://github.com/rubygems/rubygems/commit/963cb65a2d
2022-11-10 22:45:31 +00:00
Yusuke Endoh
06e17d7659 Run EnvUtil.apply_timeout_scale outside of assert_separately
It does not work well in assert_separately
2022-11-11 07:42:03 +09:00
Thomas E. Enebo
51d161980a [ruby/racc] Make racc test more flexible (for JRuby).
JRuby uses these same files for testing racc. The existing logic will not
find 'racc' in a JRuby project checkout. This change allows it to work by
just assuming 'ruby -S racc' when running tests. This will not change C
Ruby's detection when setting up tests (since earlier checks will find
racc).

https://github.com/ruby/racc/commit/b74ce5e018
2022-11-10 22:36:34 +00:00
Takashi Kokubun
2b8191bdad
YJIT: Invalidate JIT code only for ISEQ_TRACE_EVENTS (#6695) 2022-11-10 17:12:38 -05:00
Takashi Kokubun
d905632851
Define YJIT_STATS on --enable-yjit=stats (#6710) 2022-11-10 13:16:25 -08:00
Jemma Issroff
7ee1cacb84 Extract rb_shape_get_parent helper
Extract an `rb_shape_get_parent` method instead of continually calling
`rb_shape_get_shape_by_id(shape->parent_id)`
2022-11-10 13:02:50 -05:00
Takashi Kokubun
354791c248
Remove inconsistency
I meant they should be also fixed in
https://github.com/ruby/ruby/pull/6694#discussion_r1019445575
2022-11-10 10:00:16 -08:00
Jimmy Miller
8b3347950e
Enable --yjit-stats for release builds (#6694)
* Enable --yjit-stats for release builds

In order for people in the real world to report information about how their application runs with YJIT, we want to expose stats without requiring rebuilding ruby. We can do this without overhead, with the exception of count ratio in yjit, since this relies on the interpreter also counting instructions.

This change exposes those stats, while not showing ratio in yjit if we are not in a stats build.

* Update yjit.rb

Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com>
2022-11-10 12:56:22 -05:00
Takashi Kokubun
0de3bc92b4 [ruby/irb] Make $ and @ default aliases
(https://github.com/ruby/irb/pull/438)

https://github.com/ruby/irb/commit/0613589476
2022-11-10 17:31:15 +00:00
Nobuyoshi Nakada
bab8051d2d [Bug #19100] [DOC] Add NEWS about PRNG update and incompatiblity 2022-11-11 01:56:46 +09:00
Alan Wu
c771d83593
Set up EXTSTATIC before checking it
The bundle_loader check for darwin checks EXTSTATIC, but previously the
setup for the variable comes after the check. I had trouble building
using --with-static-linked-ext on darwin before this change.
2022-11-10 11:30:54 -05:00
Jemma Issroff
c726c48a3d Remove numiv from RObject
Since object shapes store the capacity of an object, we no longer
need the numiv field on RObjects. This gives us one extra slot which
we can use to give embedded objects one more instance variable (for a
total of 3 ivs). This commit removes the concept of numiv from RObject.
2022-11-10 10:11:34 -05:00
Jemma Issroff
5246f4027e Transition shape when object's capacity changes
This commit adds a `capacity` field to shapes, and adds shape
transitions whenever an object's capacity changes. Objects which are
allocated out of a bigger size pool will also make a transition from the
root shape to the shape with the correct capacity for their size pool
when they are allocated.

This commit will allow us to remove numiv from objects completely, and
will also mean we can guarantee that if two objects share shapes, their
IVs are in the same positions (an embedded and extended object cannot
share shapes). This will enable us to implement ivar sets in YJIT using
object shapes.

Co-Authored-By: Aaron Patterson <tenderlove@ruby-lang.org>
2022-11-10 10:11:34 -05:00
Jemma Issroff
9986697b62 Omit test on IO Buffers which relies on String being embedded
There is currently a bug ([#19084]) in how extended strings work in
IO Buffers. Object Shapes changes will make the string in this test
extended on 32 bit machines. Since this behavior is currently broken
(unrelated to object shapes) on 32 bit machines, this test will then
fail. We preemptively omit it so that this commit can be reverted
once the bug is fixed.
2022-11-10 10:11:34 -05:00
Jemma Issroff
199b59f065 Fix bug in array pack with shared strings
If string literals are long and they become shared, we need to make them
independent before we can write to them. [Bug #19116]
2022-11-10 09:26:37 -05:00
Peter Zhu
68bd1d6855 Fix compiler issues in test on C99
Fixes the following issue when compiling using C99:

ext/-test-/rb_call_super_kw/rb_call_super_kw.c
ext/-test-/random/loop.c:16:39: error: extra ';' outside of a function [-Werror,-Wextra-semi]
RB_RANDOM_DEFINE_INIT_INT32_FUNC(loop);
2022-11-10 09:07:20 -05:00