Skip to content
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
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
AllCops:
NewCops: enable
SuggestExtensions: false
TargetRubyVersion: 3.0
TargetRubyVersion: 3.2
Exclude:
- 'pkg/**/*'
- 'vendor/**/*'
Expand Down
2 changes: 1 addition & 1 deletion herb.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
spec.homepage = "https://herb-tools.dev"
spec.license = "MIT"

spec.required_ruby_version = ">= 3.0.0"
spec.required_ruby_version = ">= 3.2.0"
spec.require_paths = ["lib"]

spec.files = Dir[
Expand Down
8 changes: 4 additions & 4 deletions lib/herb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@
module Herb
class << self
#: (String path, ?arena_stats: bool) -> LexResult
def lex_file(path, **options)
lex(File.read(path), **options)
def lex_file(path, **)
lex(File.read(path), **)
end

#: (String path, ?track_whitespace: bool, ?analyze: bool, ?strict: bool, ?arena_stats: bool) -> ParseResult
def parse_file(path, **options)
parse(File.read(path), **options)
def parse_file(path, **)
parse(File.read(path), **)
end

#: (String source) -> Prism::ParseResult
Expand Down
1 change: 0 additions & 1 deletion lib/herb/bootstrap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ module Bootstrap

def self.generate_templates
require "pathname"
require "set"
require_relative "../../templates/template"

Dir.chdir(ROOT_PATH) do
Expand Down
2 changes: 1 addition & 1 deletion lib/herb/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ def add_postamble(postamble)
@src << postamble
end

def with_buffer(&_block)
def with_buffer(&)
if @chain_appends
@src << "; " << @bufvar unless @buffer_on_stack
yield
Expand Down
2 changes: 1 addition & 1 deletion lib/herb/engine/compiler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def visit_erb_content_node(node)
process_erb_tag(node)
end

def visit_erb_control_node(node, &_block)
def visit_erb_control_node(node, &)
if node.content
apply_trim(node, node.content.value.strip)
end
Expand Down
8 changes: 4 additions & 4 deletions templates/template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ def prefix
end

class ArrayField < Field
def initialize(kind:, **options)
def initialize(kind:, **)
@kind = kind
super(**options)
super(**)
end

def ruby_type
Expand Down Expand Up @@ -107,9 +107,9 @@ def union_kind
end

class NodeField < Field
def initialize(kind:, **options)
def initialize(kind:, **)
@kind = kind
super(**options)
super(**)
end

def c_type
Expand Down
Loading