Skip to content

Commit 7c07bcd

Browse files
joelhawksleyclaudiob
authored andcommitted
Deprecate support for Ruby < 2.7. (ViewComponent#1516)
1 parent 77b9ccc commit 7c07bcd

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

docs/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ nav_order: 5
1010

1111
## main
1212

13+
* Deprecate support for Ruby < 2.7 for removal in v3.0.0.
14+
15+
*Joel Hawksley*
16+
1317
* Add `changelog_uri` to gemspec.
1418

1519
*Joel Hawksley*

lib/view_component/compiler.rb

+4
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ def compile(raise_errors: false, force: false)
3333
return if compiled? && !force
3434
return if component_class == ViewComponent::Base
3535

36+
if RUBY_VERSION < "2.7.0"
37+
ViewComponent::Deprecation.warn("Support for Ruby versions < 2.7.0 will be removed in v3.0.0.")
38+
end
39+
3640
component_class.superclass.compile(raise_errors: raise_errors) if should_compile_superclass?
3741

3842
with_write_lock do

0 commit comments

Comments
 (0)