Commit graph

74217 commits

Author SHA1 Message Date
Kazuki Yamaguchi
63234edf67 openssl: use the old rb_ary_tmp_new() alias
openssl has to support older versions of Ruby. Undo the change in
ext/openssl/ossl_pkey_ec.c by commit efb91ff19b ("Rename
rb_ary_tmp_new to rb_ary_hidden_new", 2022-07-25).
2022-10-17 16:25:51 +09:00
Takashi Kokubun
b7de04d161
Disable dependabot for auto-request-review for now
because you have to manually update the version tag comment.
It feels unsafe to trust third party git tags when you need to pass
MATZBOT_GITHUB_TOKEN to it. Git commit sha alone isn't human-readable
and I'm reluctant to remove the comment either. It doesn't seem worth
the effort to review changes for every release of this action.
2022-10-16 22:47:49 -07:00
dependabot[bot]
bfc6c1f1cb
Bump necojackarc/auto-request-review from 0.7.0 to 0.8.0 (#6571)
Bumps [necojackarc/auto-request-review](https://github.com/necojackarc/auto-request-review) from 0.7.0 to 0.8.0.
- [Release notes](https://github.com/necojackarc/auto-request-review/releases)
- [Commits](e08cdffa27...b5e8187645)

---
updated-dependencies:
- dependency-name: necojackarc/auto-request-review
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-16 22:45:02 -07:00
Takashi Kokubun
fb6a9656a1
Do not run CodeQL on dependabot PRs 2022-10-16 22:44:15 -07:00
Takashi Kokubun
0d7292ec73
Leave only the oldest Visual Studio in AppVeyor (#6561) 2022-10-16 22:02:47 -07:00
Nobuyoshi Nakada
7cf37a5722
[DOC] Add the polar form in String#to_c 2022-10-17 12:02:34 +09:00
yui-knk
e4191ac1ec Change a tab to spaces 2022-10-17 11:30:07 +09:00
Nobuyoshi Nakada
ba9c0d0b9f
Allow run bundled_gems manually [ci skip] 2022-10-16 18:31:08 +09:00
Nobuyoshi Nakada
15488fc1c6
Update bundled gems list at 2022-10-16 2022-10-16 18:22:20 +09:00
Aaron Patterson
f0654b1027 More precisely iterate over Object instance variables
Shapes provides us with an (almost) exact count of instance variables.
We only need to check for Qundef when an IV has been "undefined"
Prefer to use ROBJECT_IV_COUNT when iterating IVs
2022-10-15 10:44:10 -07:00
Burdette Lamar
8d20632df8
[DOC] Packed data (#6520)
New page for packed data
2022-10-15 10:53:08 -05:00
Nobuyoshi Nakada
d56301c00a
No longer download zlib source
Although zlib package in vcpkg is still 1.2.12, it should be no
problem in ruby tests.
2022-10-16 00:34:59 +09:00
Nobuyoshi Nakada
1e3fa634f7
Explicitly cast to uint32_t and suppress warnings by VC
```
../src/variable.c(1440): warning C4244: 'initializing': conversion from 'double' to 'uint32_t', possible loss of data
242
../src/variable.c(1470): warning C4244: 'initializing': conversion from 'double' to 'uint32_t', possible loss of data
243
```

TODO: check for `newsize` overflow
2022-10-16 00:26:51 +09:00
Samuel Williams
7fcad1fa03
Update Fiber::Scheduler documentation. (#6562) 2022-10-15 21:43:45 +13:00
Samuel Williams
52fcb3a724
Add missing #close call to test_dup_timeout test. (#6560) 2022-10-15 20:04:58 +13:00
Samuel Williams
8a420670a2
Introduce Fiber::Scheduler#io_select hook for non-blocking IO.select. (#6559) 2022-10-15 19:59:04 +13:00
Aaron Patterson
1acc1a5c6d YJIT doesn't need rb_obj_ensure_iv_index_mapping
We should make this function static and remove it from YJIT bindings.
2022-10-14 17:14:41 -07:00
Takashi Kokubun
53e0e5e8df
YJIT: Avoid creating payloads for non-JITed ISEQs (#6549)
* YJIT: Count freed ISEQs

* YJIT: Avoid creating payloads for non-JITed ISEQs
2022-10-14 12:45:00 -07:00
Aaron Patterson
cbd3d65574
Add a test for transition order
We only cache the destination shape id, but that can lead to false cache
hits.  This patch tests that we correctly handle false cache hits
2022-10-14 12:01:42 -07:00
Jemma Issroff
9a5684bf7f Add test for ractor race condition on ivar sets 2022-10-14 11:59:36 -07:00
Jimmy Miller
fb99227ca1
More clippy fixes (#6547) 2022-10-14 13:04:53 -04:00
Eileen M. Uchitelle
7e81dd9407
Update yjit docs (#6548)
* The list of supported architectures was updated in
5ef048e5b1
but the first paragraph wasn't updated.
* `--yjit-trace-exits` was missing from the command-line options
* Fixes some spacing issues
* Updates call threshold default to 10, verified in the code that's
correct.
* Add code ticks around method names.
* Fix namespace of stats example
2022-10-14 09:43:18 -07:00
Takashi Kokubun
7e24ebc649
Disable msystem: MINGW64 job on GitHub Actions (#6545) 2022-10-14 09:16:21 -07:00
Nobuyoshi Nakada
ee6cc25026
Remove wrong dollar 2022-10-15 01:03:47 +09:00
Jonathan Hefner
6061003100 [ruby/delegate] Fix DelegateClass block "method redefined" warning
This commit prevents "method redefined" warnings when overriding methods
within a `DelegateClass` block, such as in the following example:

  ```ruby
  Base = Class.new do
    def foo
      "foo"
    end
  end

  Overridden = DelegateClass(Base) do
    def foo
      super + "!"
    end
  end
  ```

Fixes https://bugs.ruby-lang.org/issues/19047.

214fae86de
2022-10-15 00:08:44 +09:00
Samuel Williams
d416205341
Copy IO#timeout on IO#dup. (#6546) 2022-10-15 01:45:51 +13:00
manga_osyo
7b7e5153e8 [ruby/pp] [Feature #19045] Add support Data#pretty_print
343a20d721
2022-10-14 21:31:24 +09:00
Nobuyoshi Nakada
5ccb625fbb
Use roomof macro for rounding up divisions 2022-10-14 19:23:25 +09:00
S-H-GAMELINKS
ee8bcbf405 Reuse ins_methods_type_i function 2022-10-14 18:31:15 +09:00
Takashi Kokubun
5e554d30ba
Upgrade zlib_version on AppVeyor
They removed https://zlib.net/zlib1212.zip because
https://zlib.net/zlib1213.zip was released :thinking_face:

Fix CI failures like:
45064876/job/bb9biogolh0u2595
2022-10-13 16:29:06 -07:00
Jimmy Miller
3c0b4ef1a2
fixes more clippy warnings (#6543)
* fixes more clippy warnings

* Fix x86 c_callable to have doc_strings
2022-10-13 18:20:04 -04:00
Jimmy Miller
93a87f4963
Make op_ext an optional for code clarity (#6542) 2022-10-13 18:17:13 -04:00
Aaron Patterson
e5058b58c2
Only expose Ruby Shape API if VM_CHECK_MODE is enabled 2022-10-13 13:11:01 -07:00
Alan Wu
1b0c9d0e3d YJIT: No need to fill to get UDF on ARM64
On ARM64, all zeros is already undefined, so we don't need to do extra
work to fill new memory with undefined instructions.
2022-10-13 14:29:42 -04:00
Yusuke Endoh
2cc3963a00 Prevent wrong integer expansion
`(attr_index + 1)` leads to wrong integer expansion on 32-bit machines
(including Solaris 10 CI) because `attr_index_t` is uint16_t.

20221013T080004Z.fail.html.gz
```
  1) Failure:
TestRDocClassModule#test_marshal_load_version_2 [/export/home/users/chkbuild/cb-gcc/tmp/build/20221013T080004Z/ruby/test/rdoc/test_rdoc_class_module.rb:493]:
<[doc: [doc (file.rb): [para: "this is a comment"]]]> expected but was
<[doc: [doc (file.rb): [para: "this is a comment"]]]>.

  2) Failure:
TestRDocStats#test_report_method_line [/export/home/users/chkbuild/cb-gcc/tmp/build/20221013T080004Z/ruby/test/rdoc/test_rdoc_stats.rb:460]:
Expected /\#\ in\ file\ file\.rb:4/ to match "The following items are not documented:\n" +
"\n" +
"  class C # is documented\n" +
"\n" +
"    # in file file.rb\n" +
"    def m1; end\n" +
"\n" +
"  end\n" +
"\n" +
"\n".

  3) Failure:
TestRDocStats#test_report_attr_line [/export/home/users/chkbuild/cb-gcc/tmp/build/20221013T080004Z/ruby/test/rdoc/test_rdoc_stats.rb:91]:
Expected /\#\ in\ file\ file\.rb:3/ to match "The following items are not documented:\n" +
"\n" +
"  class C # is documented\n" +
"\n" +
"    attr_accessor :a # in file file.rb\n" +
"\n" +
"  end\n" +
"\n" +
"\n".
```
2022-10-13 08:14:04 -07:00
Nobuyoshi Nakada
4b1504ae0a [ruby/uri] Fix splitting relative URI
ffbab83de6
2022-10-13 16:24:53 +09:00
Samuel Williams
765ee822b5
Add missing f.resume to fiber test. (#6539) 2022-10-13 19:04:06 +13:00
Hiroshi SHIBATA
b734832883
Skip utime example with Intel C Compiler suite 2022-10-13 13:42:22 +09:00
Hiroshi SHIBATA
1cda414622 Raise ArgumentError with empty host url again.
Fixup dd5118f852

Co-authored-by: Koichi Sasada <ko1@atdot.net>
2022-10-13 12:32:02 +09:00
Nobuyoshi Nakada
c50623f093
Revert "FreeBSD make uses the target under srcdir [ci skip]"
This reverts commit 751ffb276f, which
caused build failures on other platforms.
2022-10-13 12:24:59 +09:00
Nobuyoshi Nakada
751ffb276f
FreeBSD make uses the target under srcdir [ci skip] 2022-10-13 12:10:10 +09:00
NARUSE, Yui
dd5118f852
URI.parse should set empty string in host instead of nil 2022-10-13 11:04:06 +09:00
Takashi Kokubun
166140aa28
YJIT: Set RUST_BACKTRACE=1 in every Cirrus script (#6526)
* YJIT: Set RUST_BACKTRACE=1 in every Cirrus script

* YJIT: Print $CIRRUS_ENV correctly

It looks like $CIRRUS_ENV is cleaned up at every script.
2022-10-12 15:50:50 -04:00
Aaron Patterson
107531583c Unwrap shape id as unsigned int
Shape IDs are unsigned.  This commit unwraps the shape id as an unsigned
int, which will automatically raise an argument error and also eliminate
a compilation warning.
2022-10-12 09:56:11 -07:00
Nobuyoshi Nakada
b55e3b842a Initialize shape attr index also in non-markable CC 2022-10-12 09:14:55 -07:00
Nobuyoshi Nakada
80da7250c5
file2lastrev.rb: Refactor VCS directory search
Search VCS directory after other options are in effective, i.e.,
`--srcdir=nonexitent --suppress_not_found` options, as well as the
reverse order case, should print the current date only and exit
successfully.
2022-10-12 22:24:53 +09:00
Nobuyoshi Nakada
70bc8cc6c2
Adjust indents [ci skip] 2022-10-12 22:22:04 +09:00
Yusuke Endoh
504e388525 Suppress a "warning: method redefined" in test/ruby/test_method.rb 2022-10-12 21:51:23 +09:00
Yusuke Endoh
9cfc45d6e5 Suppress warnings in test/ruby/test_ast.rb
The tests for error tolerance printed some warnings. This change
suppresses them.
2022-10-12 21:48:28 +09:00
Yusuke Endoh
7a9f865a1d Do not read cached_id from callcache on stack
The inline cache is initialized by vm_cc_attr_index_set only when
vm_cc_markable(cc). However, vm_getivar attempted to read the cache
even if the cc is not vm_cc_markable.

This caused a condition that depends on uninitialized value.
Here is an output of valgrind:

```
==10483== Conditional jump or move depends on uninitialised value(s)
==10483==    at 0x4C1D60: vm_getivar (vm_insnhelper.c:1171)
==10483==    by 0x4C1D60: vm_call_ivar (vm_insnhelper.c:3257)
==10483==    by 0x4E8E48: vm_call_symbol (vm_insnhelper.c:3481)
==10483==    by 0x4EAD8C: vm_sendish (vm_insnhelper.c:5035)
==10483==    by 0x4C62B2: vm_exec_core (insns.def:820)
==10483==    by 0x4DD519: rb_vm_exec (vm.c:0)
==10483==    by 0x4F00B3: invoke_block (vm.c:1417)
==10483==    by 0x4F00B3: invoke_iseq_block_from_c (vm.c:1473)
==10483==    by 0x4F00B3: invoke_block_from_c_bh (vm.c:1491)
==10483==    by 0x4D42B6: rb_yield (vm_eval.c:0)
==10483==    by 0x259128: rb_ary_each (array.c:2733)
==10483==    by 0x4E8730: vm_call_cfunc_with_frame (vm_insnhelper.c:3227)
==10483==    by 0x4EAD8C: vm_sendish (vm_insnhelper.c:5035)
==10483==    by 0x4C6254: vm_exec_core (insns.def:801)
==10483==    by 0x4DD519: rb_vm_exec (vm.c:0)
==10483==
```

In fact, the CI on FreeBSD 12 started failing since ad63b668e2.

```
gmake[1]: Entering directory '/usr/home/chkbuild/chkbuild/tmp/build/20221011T163003Z/ruby'
/usr/home/chkbuild/chkbuild/tmp/build/20221011T163003Z/ruby/lib/optparse.rb:924:in `complete': undefined method `complete' for nil:NilClass (NoMethodError)
	from /usr/home/chkbuild/chkbuild/tmp/build/20221011T163003Z/ruby/lib/optparse.rb:1816:in `block in visit'
	from /usr/home/chkbuild/chkbuild/tmp/build/20221011T163003Z/ruby/lib/optparse.rb:1815:in `reverse_each'
	from /usr/home/chkbuild/chkbuild/tmp/build/20221011T163003Z/ruby/lib/optparse.rb:1815:in `visit'
	from /usr/home/chkbuild/chkbuild/tmp/build/20221011T163003Z/ruby/lib/optparse.rb:1847:in `block in complete'
	from /usr/home/chkbuild/chkbuild/tmp/build/20221011T163003Z/ruby/lib/optparse.rb:1846:in `catch'
	from /usr/home/chkbuild/chkbuild/tmp/build/20221011T163003Z/ruby/lib/optparse.rb:1846:in `complete'
	from /usr/home/chkbuild/chkbuild/tmp/build/20221011T163003Z/ruby/lib/optparse.rb:1640:in `block in parse_in_order'
	from /usr/home/chkbuild/chkbuild/tmp/build/20221011T163003Z/ruby/lib/optparse.rb:1632:in `catch'
	from /usr/home/chkbuild/chkbuild/tmp/build/20221011T163003Z/ruby/lib/optparse.rb:1632:in `parse_in_order'
	from /usr/home/chkbuild/chkbuild/tmp/build/20221011T163003Z/ruby/lib/optparse.rb:1626:in `order!'
	from /usr/home/chkbuild/chkbuild/tmp/build/20221011T163003Z/ruby/lib/optparse.rb:1732:in `permute!'
	from /usr/home/chkbuild/chkbuild/tmp/build/20221011T163003Z/ruby/lib/optparse.rb:1757:in `parse!'
	from ./ext/extmk.rb:359:in `parse_args'
	from ./ext/extmk.rb:396:in `<main>'
```

This change adds a guard to read the cache only when vm_cc_markable(cc).
It might be better to initialize the cache as INVALID_SHAPE_ID when the
cc is not vm_cc_markable.
2022-10-12 20:28:24 +09:00