This has always been a dependency, but Ruby 3 has dropped the code. It's now a regular gem.
It is set in the gemspec since that allows plugins to also benefit from it. That does mean that it's also required on older Ruby versions and should be packaged.
Related issues
Feature #35510: Explicitly depend on webrick for Ruby 3 support
Fixes #35510 - Depend on webrick for Ruby 3
This has always been a dependency, but Ruby 3 has dropped the code. It's
now a regular gem.
It is set in the gemspec since that allows plugins to also benefit from
it. That does mean that it's also required on older Ruby versions and
should be packaged.