diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index df6c407..ccb6a70 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -21,7 +21,7 @@ jobs: - macos ruby: - - "2.7.3" + - "2.7.0" - "2.7" - "3.0" - "3.1" diff --git a/console.gemspec b/console.gemspec index f20efa4..16ca8c0 100644 --- a/console.gemspec +++ b/console.gemspec @@ -17,7 +17,7 @@ Gem::Specification.new do |spec| spec.files = Dir.glob(['{bake,lib}/**/*', '*.md'], File::FNM_DOTMATCH, base: __dir__) - spec.required_ruby_version = ">= 2.7.3" + spec.required_ruby_version = ">= 2.7" spec.add_dependency "fiber-local" diff --git a/lib/console/progress.rb b/lib/console/progress.rb index 4880ec9..6220299 100644 --- a/lib/console/progress.rb +++ b/lib/console/progress.rb @@ -73,8 +73,14 @@ def resize(total) return self end - def mark(...) - @output.info(@subject, ...) + if RUBY_VERSION >= '2.7.3' + def mark(...) + @output.info(@subject, ...) + end + else + def mark(*arguments, **options, &block) + @output.info(@subject, *arguments, **options, &block) + end end def to_s