Skip to content

Support for Ruby v4.0#41

Open
madogiwa0124 wants to merge 1 commit intoserverkit:mainfrom
madogiwa0124:support-ruby-v4
Open

Support for Ruby v4.0#41
madogiwa0124 wants to merge 1 commit intoserverkit:mainfrom
madogiwa0124:support-ruby-v4

Conversation

@madogiwa0124
Copy link
Copy Markdown
Contributor

Ruby v4.0.0 has been officially released 🎉

This update modifies the CI configuration to include Ruby 4.0 in the testing matrix and updated dependencies, ensuring compatibility and stability with the latest Ruby version.

https://www.ruby-lang.org/en/news/2025/12/25/ruby-4-0-0-released/

In Ruby v4.0.0, the 'logger' library has been removed from the standard library and is now a bundled gem. Therefore, to use it within serverkit, it is necessary to explicitly install it by adding it as a dependency in the gemspec.

The following bundled gems are promoted from default gems.
logger 1.7.0
https://www.ruby-lang.org/en/news/2025/12/25/ruby-4-0-0-released/#stdlib-updates

ref:

require "logger"

Also, since the rubocop v1.23.0 being used depends on ostruct, which has been removed from the default gems, ostruct has also been added to the Gemfile for explicit installation.

gems/rubocop-1.23.0/lib/rubocop/formatter/html_formatter.rb:5: warning: ostruct used to be loaded from the standard library, but is not part of the default gems since Ruby 4.0.0.
You can add ostruct to your Gemfile or gemspec to fix this error.
rake aborted!
LoadError: cannot load such file -- ostruct (LoadError)

The following bundled gems are promoted from default gems.
ostruct 0.6.3
https://www.ruby-lang.org/en/news/2025/12/25/ruby-4-0-0-released/#stdlib-updates

Ruby v4.0.0 has been officially released.
This update modifies the CI configuration to include Ruby 4.0 in the testing matrix,
ensuring compatibility and stability with the latest Ruby version.

https://www.ruby-lang.org/en/news/2025/12/25/ruby-4-0-0-released/

In Ruby v4.0.0, the 'logger' library has been removed from the standard library and is now a bundled gem.
Therefore, to use it within serverkit, it is necessary to explicitly install it by adding it as a dependency in the gemspec.

> The following bundled gems are promoted from default gems.
> logger 1.7.0
> https://www.ruby-lang.org/en/news/2025/12/25/ruby-4-0-0-released/#stdlib-updates

ref:
https://github.com/serverkit/serverkit/blob/48e2bf1de089c6e3ab14e2ea0dd24da5461f9faf/lib/serverkit/logger.rb#L3

Also, since the rubocop v1.23.0 being used depends on `ostruct`, which has been removed from the default gems, `ostruct` has also been added to the Gemfile for explicit installation.

```
gems/rubocop-1.23.0/lib/rubocop/formatter/html_formatter.rb:5: warning: ostruct used to be loaded from the standard library, but is not part of the default gems since Ruby 4.0.0.
You can add ostruct to your Gemfile or gemspec to fix this error.
rake aborted!
LoadError: cannot load such file -- ostruct (LoadError)
```

> The following bundled gems are promoted from default gems.
> ostruct 0.6.3
> https://www.ruby-lang.org/en/news/2025/12/25/ruby-4-0-0-released/#stdlib-updates
@madogiwa0124 madogiwa0124 marked this pull request as ready for review January 24, 2026 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant