Skip to content

Deprecate support for Ruby < 2.7 #1516

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ nav_order: 5

## main

* Deprecate support for Ruby < 2.7 for removal in v3.0.0.

*Joel Hawksley*

* Add `changelog_uri` to gemspec.

*Joel Hawksley*
Expand Down
4 changes: 4 additions & 0 deletions lib/view_component/compiler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ def compile(raise_errors: false, force: false)
return if compiled? && !force
return if component_class == ViewComponent::Base

if RUBY_VERSION < "2.7.0"
ViewComponent::Deprecation.warn("Support for Ruby versions < 2.7.0 will be removed in v3.0.0.")
end

component_class.superclass.compile(raise_errors: raise_errors) if should_compile_superclass?

with_write_lock do
Expand Down