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

78260 Коммитов

Автор SHA1 Сообщение Дата
Kevin Newton ec59b95cfd [ruby/yarp] Use smaller regexp options
https://github.com/ruby/yarp/commit/4deb7c3ae0
2023-06-26 14:03:33 +00:00
Benoit Daloze 515bd42144 Update to ruby/spec@30e1c35 2023-06-26 15:55:11 +02:00
Benoit Daloze f73fa29927 Update to ruby/mspec@3cf2d16 2023-06-26 15:55:09 +02:00
Steven Johnstone 4fc8b8f06d [ruby/yarp] Prevent reading/writing outside the bounds of options
https://github.com/ruby/yarp/commit/52bed3cbe2
2023-06-26 13:31:29 +00:00
Haldun Bayhantopcu 44197e51dc [ruby/yarp] Add missing snapshot
https://github.com/ruby/yarp/commit/08f08a6cc4
2023-06-26 13:13:57 +00:00
Nobuyoshi Nakada 3acf5a27c9
Suppress warnings 2023-06-26 19:06:46 +09:00
Nobuyoshi Nakada dc940cc740
[DOC] Nested ordered lists need more indents 2023-06-26 18:25:21 +09:00
Nobuyoshi Nakada d1b6ff42fa
Add the chopsticks code at RubyKaigi2023 2023-06-26 13:52:07 +09:00
dependabot[bot] 94ac77c955 Bump ossf/scorecard-action from 2.1.3 to 2.2.0
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.1.3 to 2.2.0.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](80e868c13c...08b4669551)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-26 12:44:34 +09:00
BurdetteLamar ed587abffb Fix broken links 2023-06-25 16:44:59 -04:00
Nobuyoshi Nakada 8307627245 [ruby/uri] String literals are frozen now
https://github.com/ruby/uri/commit/0b6ad60af6
2023-06-25 15:45:32 +00:00
Nobuyoshi Nakada c21436cb35 [ruby/uri] Fix host part in relative referece #83
In relative referece, host part can be ommitted but can not be empty.

https://github.com/ruby/uri/commit/2980f0ba02
2023-06-25 15:24:05 +00:00
Nobuyoshi Nakada 15ec072a42
[DOC] Parse documents under doc/yjit 2023-06-25 17:21:31 +09:00
Nobuyoshi Nakada 0a9ef0548b
[DOC] Parse all documents under doc/regexp 2023-06-25 17:21:31 +09:00
git 9df5b4562e Update bundled gems list at 2023-06-25 2023-06-25 07:00:17 +00:00
tomoya ishida 00216c8aa0 [ruby/irb] Fix process_continue(rename to should_continue?) and
check_code_block(rename to check_code_syntax)
(https://github.com/ruby/irb/pull/611)

https://github.com/ruby/irb/commit/b7f4bfaaa4
2023-06-25 05:12:16 +00:00
tomoya ishida 406799cae8 [ruby/irb] Omit nesting_level, use indent_level to build prompt
string
(https://github.com/ruby/irb/pull/610)

https://github.com/ruby/irb/commit/f01ff0811b
2023-06-24 22:20:43 +00:00
Jeremy Evans a14915ca4b Do not have Enumeratory::Lazy#zip mark result as packed
Fixes [Bug #19569]
2023-06-24 08:41:32 -07:00
Nobuyoshi Nakada c94b5f121d De-duplicate parse_st.c code from st.c 2023-06-24 19:17:37 +09:00
Nobuyoshi Nakada 3443e43b62 Remove `st_functions_t` 2023-06-24 19:17:37 +09:00
Nobuyoshi Nakada e02c7a7340
Ignore only warnings known by clang
Clang 17 does not know warning group '-Wgnu-empty-initializer'.
2023-06-24 18:18:58 +09:00
Nobuyoshi Nakada 97152d44dc [ruby/yarp] Name test methods from relative paths
Full path name of the source directory is a useless noise as tests.

https://github.com/ruby/yarp/commit/44a7ae2e64
2023-06-24 15:32:11 +09:00
Steven Johnstone 261e3663fd [ruby/yarp] Check for eof in yp_regexp_char_is_eof
https://github.com/ruby/yarp/commit/f3fbc5bf9e
2023-06-23 19:56:40 +00:00
Steven Johnstone 6ee106ff79 [ruby/yarp] If ? is last char of regexp buffer, don't read beyond it.
https://github.com/ruby/yarp/commit/1764532572
2023-06-23 19:56:39 +00:00
Steven Johnstone 6dc2314965 [ruby/yarp] Don't read past the end of input parsing regex group
https://github.com/ruby/yarp/commit/03f5a330a9
2023-06-23 19:56:39 +00:00
Aaron Patterson 7ce6bcaf8b Expose rb_hash_resurrect
This is for implementing the `duphash` instruction
2023-06-23 11:46:21 -07:00
Peter Zhu 01507d2f80 Skip test on Solaris SPARC
This test fails on Solaris SPARC with the following error and I can't
figure out why:
  TestGCCompact#test_moving_hashes_down_size_pools
  Expected 499 to be >= 500.
2023-06-23 10:37:04 -04:00
Nobuyoshi Nakada 73529a12bb
Declare `RHASH_AR_TABLE` and `RHASH_ST_TABLE` return non-null 2023-06-23 14:54:50 +09:00
git 00c1bd66d6 Update default gems list at b7375770ef [ci skip] 2023-06-23 03:52:44 +00:00
Hiroshi SHIBATA b7375770ef [ruby/timeout] Bump up v0.4.0
https://github.com/ruby/timeout/commit/413194f8d2
2023-06-23 03:52:03 +00:00
Jeremy Evans e8c9385123 [ruby/timeout] Raise exception instead of throw/catch for timeouts
(https://github.com/ruby/timeout/pull/30)

throw/catch is used for non-local control flow, not for exceptional situations.
For exceptional situations, raise should be used instead.  A timeout is an
exceptional situation, so it should use raise, not throw/catch.

Timeout's implementation that uses throw/catch internally causes serious problems.
Consider the following code:

```ruby
def handle_exceptions
  yield
rescue Exception => exc
  handle_error # e.g. ROLLBACK for databases
  raise
ensure
  handle_exit unless exc # e.g. COMMIT for databases
end

Timeout.timeout(1) do
  handle_exceptions do
    do_something
  end
end
```

This kind of design ensures that all exceptions are handled as errors, and
ensures that all exits (normal exit, early return, throw/catch) are not
handled as errors.  With Timeout's throw/catch implementation, this type of
code does not work, since a timeout triggers the normal exit path.

See https://github.com/rails/rails/pull/29333 for an example of the damage
Timeout's design has caused the Rails ecosystem.

This switches Timeout.timeout to use raise/rescue internally.  It adds a
Timeout::ExitException subclass of exception for the internal raise/rescue,
which Timeout.timeout will convert to Timeout::Error for backwards
compatibility.  Timeout::Error remains a subclass of RuntimeError.

This is how timeout used to work in Ruby 2.0.  It was changed in Ruby 2.1,
after discussion in [Bug #8730] (commit
https://github.com/ruby/timeout/commit/238c003c921e in the timeout repository). I
think the change from using raise/rescue to using throw/catch has caused
significant harm to the Ruby ecosystem at large, and reverting it is
the most sensible choice.

From the translation of [Bug #8730], it appears the issue was that
someone could rescue Exception and not reraise the exception, causing
timeout errors to be swallowed.  However, such code is broken anyway.
Using throw/catch causes far worse problems, because then it becomes
impossible to differentiate between normal control flow and exceptional
control flow.

Also related to this is [Bug #11344], which changed how
Thread.handle_interrupt interacted with Timeout.

https://github.com/ruby/timeout/commit/f16545abe6

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2023-06-22 18:24:46 +00:00
Nobuyoshi Nakada b934976024
Prefer `0` over `NULL` as function pointers
SunC warns use of `NULL`, pointer to data as function pointers.
2023-06-23 03:15:55 +09:00
Peter Zhu 52f8de4f21 Remove dead code in hash.c
RHASH_TABLE_NULL_P and ar_alloc_table are no longer needed since
all Hash will have AR tables.
2023-06-22 14:08:25 -04:00
ima1zumi 218a8d8ef1 [ruby/reline] Remove unused method
(https://github.com/ruby/reline/pull/557)

`get_mbchar_byte_size_by_first_char` isn't used in Reline.
Also, this method implements the same functionality as `String#bytesize` and is unnecessary.
2023-06-22 17:07:23 +00:00
Jeremy Evans de51a4a13e [ruby/ipaddr] Consider IPv4-mapped IPv6 addresses private if IPv4 address is private
Fixes [Bug #19479]

https://github.com/ruby/ipaddr/commit/7faa0768d3
2023-06-22 16:40:46 +00:00
Takashi Kokubun 711cabec26 Sync ruby/yarp to 89a00203af 2023-06-22 09:23:07 -07:00
Jemma Issroff e8fb84265c [ruby/yarp] Allow for block statements after elsif and else
https://github.com/ruby/yarp/commit/4560cab235
2023-06-22 09:20:40 -07:00
Kevin Newton 7fad7d345a [ruby/yarp] Do not leak file descriptors
https://github.com/ruby/yarp/commit/83c2c45b28
2023-06-22 09:19:39 -07:00
Kevin Newton b879528e24 [ruby/yarp] Do not leak memory from lex modes
https://github.com/ruby/yarp/commit/df6661740c
2023-06-22 09:19:36 -07:00
Takashi Kokubun edd488109f Sync ruby/yarp with sync_default_gems 2023-06-22 08:59:04 -07:00
Nobuyoshi Nakada 1344de5621
[Bug #19743] All but EOF can be read again after push-back 2023-06-22 20:10:13 +09:00
Nobuyoshi Nakada 8142728b5a [rubygems/rubygems] Prefer `assert_include` over mere `assert`
https://github.com/rubygems/rubygems/commit/140405cee6
2023-06-22 09:44:41 +00:00
Nobuyoshi Nakada a651903a86 [rubygems/rubygems] Prefer `assert_predicate` over mere `assert`
https://github.com/rubygems/rubygems/commit/0d10063824
2023-06-22 09:44:41 +00:00
Nobuyoshi Nakada 67ab8b4346 [rubygems/rubygems] Fix argument order of `assert_equal`
https://github.com/rubygems/rubygems/commit/a7c015f82b
2023-06-22 09:44:40 +00:00
Nobuyoshi Nakada ddb431c960
Fix leaked FD for an empty file 2023-06-22 13:21:30 +09:00
Kevin Newton 010b8a29dc [ruby/yarp] Set default external encoding for parse tests
https://github.com/ruby/yarp/commit/e757fde3ed
2023-06-21 22:05:10 +00:00
Takashi Kokubun 2beb14506f Handle non-enum values to fix -Wreturn-type
http://ci.rvm.jp/results/trunk-random1@ruby-sp2-docker/4612360
2023-06-21 14:31:45 -07:00
Kevin Newton 39a40af14f [ruby/yarp] Truly fix snapshot testing on Ruby CI
https://github.com/ruby/yarp/commit/c4e835711e
2023-06-21 21:28:30 +00:00
Kevin Newton 51ff9cd747 [ruby/yarp] Actually fix snapshot tests
https://github.com/ruby/yarp/commit/ba9e5b447e
2023-06-21 21:23:17 +00:00
Takashi Kokubun 06ed9fcd0b Stop asking YJIT team to review dependabot changes 2023-06-21 13:56:00 -07:00