86825 Commits

Author SHA1 Message Date
Nobuyoshi Nakada
bed34b3a52
Show the detail info in the first line 2024-06-25 11:50:03 +09:00
Nobuyoshi Nakada
250fc1223c [Bug #20457] Do not remove final return node
This was an optimization for versions prior to 1.9 that traverse the
AST at runtime.
2024-06-25 11:07:58 +09:00
Nobuyoshi Nakada
22f98bb7ca Parenthesize nd_fl_newline macro expressions 2024-06-25 11:07:58 +09:00
tomoya ishida
691d85d342 [ruby/reline] Rerender and enter raw mode again by SIGCONT
(https://github.com/ruby/reline/pull/727)

https://github.com/ruby/reline/commit/be45660c83
2024-06-25 00:55:07 +00:00
Jeremy Evans
ae0c7faa79
Handle hash and splat nodes in defined?
This supports the nodes in both in the parse.y and prism compilers.

Fixes [Bug #20043]

Co-authored-by: Kevin Newton <kddnewton@gmail.com>
2024-06-24 11:32:58 -07:00
Nobuyoshi Nakada
e428ee7bbe [ruby/io-console] Use locale insensitive casecmp
https://github.com/ruby/io-console/commit/4b2e876dd7
2024-06-24 15:38:11 +00:00
Nobuyoshi Nakada
f4f8aa0f89 [ruby/io-console] Use strcasecmp
https://github.com/ruby/io-console/commit/f8ec8a0617
2024-06-24 15:38:10 +00:00
Nobuyoshi Nakada
25c2aa0a1c [ruby/io-console] Use gperf 3.1 to generate ANSI-C code
https://github.com/ruby/io-console/commit/3798aae42d
2024-06-24 15:38:10 +00:00
Nobuyoshi Nakada
865a2027a1 [ruby/date] Use locale insensitive casecmp
https://github.com/ruby/date/commit/cfbd6a6b13
2024-06-24 15:36:56 +00:00
Nobuyoshi Nakada
7aafd3ed0e [ruby/date] Use strncasecmp
https://github.com/ruby/date/commit/5974ac9c7e
2024-06-24 15:36:56 +00:00
Nobuyoshi Nakada
12e66f11e5 [ruby/date] Use gperf 3.1 to generate ANSI-C code
https://github.com/ruby/date/commit/5d67437b1f
2024-06-24 15:36:55 +00:00
Nobuyoshi Nakada
1213623e5c
Use gperf 3.1 to generate ANSI-C code 2024-06-24 23:43:45 +09:00
Jean Boussier
95ffcd3f9f Fix --debug-frozen-string-literal to not apply --disable-frozen-string-literal
[Feature #20205]

This was an undesired side effect. Now that this value is a triplet, we can't
assume it's disabled by default.
2024-06-24 12:43:39 +02:00
Yusuke Endoh
9cfc1362aa Extend the timeout of test_try_ldflag_invalid_opt and test_try_cppflag_invalid_opt 2024-06-24 18:14:34 +09:00
Nobuyoshi Nakada
65d3eacc80 No longer needs sigsetjmp
Since signal handlers just set flag and return now, `sigsetjmp` and
`siglongjmp` will not be needed.
2024-06-24 17:38:01 +09:00
Koichi Sasada
92f2cf1bf9 With ASAN EC_REPUSH_TAG doesn't work
With ASAN, `EC_TMPPOP_TAG`/`EC_REPUSH_TAG` doesn't work
so rewrite it without them. They are used for the performance,
but here calling stacked `END{}` and not so performance critical.
2024-06-24 16:50:09 +09:00
Naoto Ono
afd42e4db7 Use $GITHUB_PATH 2024-06-24 13:25:30 +09:00
Naoto Ono
a22448df9d Integrate Launchable into mingw 2024-06-24 13:25:30 +09:00
Yusuke Endoh
96b45e61ca Introduce retry to the setup of test files with TestFile#test_stat
GitHub Actions macos-arm-oss is often too slow and does not timestamp as
expected.
2024-06-24 13:18:21 +09:00
Yusuke Endoh
ace17ba3cd Extend the timeout of Fiddle::TestFunction#test_nogvl_poll 2024-06-24 13:11:45 +09:00
Yusuke Endoh
3a323c6b12 Extend the timeout of TestVMDump#test_darwin_invalid_call, etc. 2024-06-24 11:54:10 +09:00
Hiroshi SHIBATA
2b5ddcee56 Removed obsoleted workaround for OpenSSL 2024-06-24 10:48:15 +09:00
Hiroshi SHIBATA
f58fef62dc Use expanded path for --with-opt-dir 2024-06-24 10:48:15 +09:00
Hiroshi SHIBATA
5f5da2e839 Use manifest mode of vcpkg 2024-06-24 10:48:15 +09:00
MSP-Greg
18404af9ec .github/actions/setup/macos/action.yml - use brew openssl@3, not 1.1 2024-06-24 09:03:55 +09:00
git
acce96647d Update bundled gems list as of 2024-06-22 2024-06-23 06:59:37 +00:00
Nobuyoshi Nakada
d8c6e91748
Fix dangling else 2024-06-23 09:42:25 +09:00
Dmitry Davydov
fba8aff7af [Bug #20592] Fix segfault when sending NULL to freeaddrinfo
On alpine freeaddrinfo does not accept NULL pointer
2024-06-22 22:05:31 +09:00
Nobuyoshi Nakada
d122a68863
Exported symbols in DLL on Windows are managed by win32/mkexports.rb 2024-06-22 18:48:14 +09:00
Yuta Saito
73b7eebf07 build: fix crossruby build by handling empty ac_abs_builddir
`ac_abs_builddir` can be empty when the build is top-level (not
subdirs, and Ruby is usually the case). In such case, the MINIRUBY is
expanded to `$RUBY -I -r'$(arch)-fake'`, which interprets `-r$(arch)-fake`
as an argument to `-I` option. This led to:
- Not loading the fake config file
- Then not setting `CROSS_COMPILING` constant during extmk.rb execution
- Then misusing cross-compiled `./miniruby` instead of baseruby to generate
  files used in exts.

This commit fixes the issue by handling the empty `ac_abs_builddir` case
properly.
2024-06-22 15:12:00 +09:00
Nobuyoshi Nakada
cab0d03037
Get rid of nesting backquotes
Also executing variable containing an option may not be portable.
Follow up of dd378c5a2483002d50053cf81d00004c1fb3c8bd.
2024-06-22 10:58:32 +09:00
Nobuyoshi Nakada
dd378c5a24
Expand --with-opt-dir arguments 2024-06-22 02:16:16 +09:00
Peter Zhu
90763e04ba Load external GC using command line argument
This commit changes the external GC to be loaded with the `--gc-library`
command line argument instead of the RUBY_GC_LIBRARY_PATH environment
variable because @nobu pointed out that loading binaries using environment
variables can pose a security risk.
2024-06-21 11:49:01 -04:00
Koichi Sasada
bd583ca645 retry on cancelling of getaddrinfo
When the registerred unblock function is called, it should retry
the cancelled blocking function if possible after checkints.

For example, `SIGCHLD` can cancel this method, but it should not
raise any exception if there is no trap handlers.

The following is repro-code:

```ruby
require 'socket'
PN = 10_000

1000000.times{
  p _1
  PN.times{
    fork{
      sleep rand(0.3)
    }
  }
  i = 0
  while i<PN
    cpid = Process.wait -1, Process::WNOHANG
    if cpid
      # p [i, cpid]
      i += 1
    end

    begin
      TCPServer.new(nil, 0).close
    rescue
      p $!
      exit!
    end
  end
}
```
2024-06-21 22:36:42 +09:00
Yusuke Endoh
9a22d4b9a0 [ruby/prism] Update #line that was missed to update
Follow up https://github.com/ruby/prism/commit/1a2626be275d

https://github.com/ruby/prism/commit/8174aac929
2024-06-21 12:32:04 +00:00
Hiroshi SHIBATA
bf061ce6fe Use the official way for binary cache with vcpkg
https://learn.microsoft.com/en-us/vcpkg/consume/binary-caching-github-actions-cache
2024-06-21 18:25:03 +09:00
Yusuke Endoh
ac9e84df3d Support LCOV 2.0
LCOV 2.0, a GCOV frontend, seems to have stricter error checking
2024-06-21 14:48:44 +09:00
Yusuke Endoh
47364c147d Apply EnvUtil.apply_timeout_scale for TestFile#test_stat
... to respect RUBY_TEST_TIMEOUT_SCALE. This test somehow fails
frequently on macos-arm-oss with --repeat-count=2

https://app.launchableinc.com/organizations/ruby/workspaces/ruby/data/test-paths/file%3Dtest%2Fruby%2Ftest_file.rb%23%23%23class%3DTestFile%23%23%23testcase%3Dtest_stat?organizationId=ruby&workspaceId=ruby&testPathId=file%3Dtest%2Fruby%2Ftest_file.rb%23%23%23class%3DTestFile%23%23%23testcase%3Dtest_stat&testSessionStatus=flake
2024-06-21 13:57:07 +09:00
ccmywish
185a6c991e [rubygems/rubygems] Update contents of gem.bat on Windows
(https://github.com/rubygems/rubygems/pull/6483)

https://github.com/rubygems/rubygems/commit/41d8cffd2e

Co-Authored-By: MSP-Greg <Greg.mpls@gmail.com>
2024-06-21 02:27:47 +00:00
Nobuyoshi Nakada
249a1fb0eb
Show more in RBIMPL_ASSERT_TYPE 2024-06-21 09:25:00 +09:00
Nobuyoshi Nakada
b834c62efd
Delegate from RBIMPL_ASSERT_OR_ASSUME to RUBY_ASSERT_ALWAYS
Get rid of expansion of the argument which often contains complicated
macros, and simplify the failure message.
2024-06-21 09:24:59 +09:00
Koichi Sasada
b182f2a045 fix sendfwd with send and method_missing
combination with `send` method (optimized) or `method_missing`
and forwarding send (`...`) needs to respect given
`rb_forwarding_call_data`. Otherwize it causes critical error
such as SEGV.
2024-06-21 00:43:48 +09:00
Peter Zhu
f5fd87b695 Make ruby_external_gc_init static
This function is not used outside of gc.c.
2024-06-20 11:34:52 -04:00
Jeremy Evans
a47a176768 Skip 3 specs when $HOME is not a valid directory
If $HOME isn't a valid directory, these specs fail, but I think it
is better to skip in this case, as it does not indicate a bug.

This fixes specs when run in the OpenBSD port, which sets $HOME
to an invalid directory to ensure that software's build system
is not accidentally relying on it.
2024-06-20 07:54:02 -07:00
Kevin Newton
9bd5995b40 [PRISM] Remove duplicated tests
These tests are flaky and are duplicative of other tests that are
run in CI when parser=prism.
2024-06-20 09:24:19 -04:00
Yusuke Endoh
c3b5b98e15 [ruby/prism] Set `#line" directives to respect the path in ruby/ruby repo
ruby/ruby measures test coverage of C code, but the `#line` directive
generated by prism points to a file that does not exist, so coverage is
not taken properly.

This changeset specifies the location of the source files as a relative
path in terms of ruby/ruby repo.

https://github.com/ruby/prism/commit/1a2626be27
2024-06-20 12:36:18 +00:00
David Rodríguez
0a9f1ecc37 [rubygems/rubygems] Add a regression test for previous bundler update --bundler fix
https://github.com/rubygems/rubygems/commit/c392593dc3
2024-06-20 09:26:33 +00:00
nick evans
b558fc0e36 [ruby/securerandom] Update UUID documentation with RFC9562 links
RFC9562 was released almost two weeks ago, so we can replace the "draft"
UUIDv7 URL with the final RFC URL too.  RFC9562 obsoletes RFC4122, so I
replaced its link as well.

https://github.com/ruby/securerandom/commit/1e41c3d2cb
2024-06-20 08:34:31 +00:00
Nobuyoshi Nakada
92ab2dac22 [rubygems/rubygems] Check if failed with the expected error
https://github.com/rubygems/rubygems/commit/3f22e9df8d
2024-06-20 07:16:56 +00:00
Nobuyoshi Nakada
e345970707 [rubygems/rubygems] Revert "Workaround for TruffleRuby that set nil to LIBRUBY_RELATIVE"
This reverts commit https://github.com/rubygems/rubygems/commit/06fd39997348, for a
bug that is fixed by https://github.com/rubygems/rubygems/commit/0148cce153a5.

https://github.com/rubygems/rubygems/commit/907e51e521
2024-06-20 07:16:55 +00:00