Skip to content

Commit

Permalink
Remove Ruby <= 2.5 compatibility code
Browse files Browse the repository at this point in the history
The gemspec dictates Ruby >= 2.7
  • Loading branch information
Earlopain committed Sep 18, 2024
1 parent 255fdb4 commit 4ec6a7d
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions lib/erb_lint/file_loader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,8 @@ def initialize(base_path)
@base_path = base_path
end

if RUBY_VERSION >= "2.6"
def yaml(filename)
YAML.safe_load(read_content(filename), permitted_classes: [Regexp, Symbol], filename: filename) || {}
end
else
def yaml(filename)
YAML.safe_load(read_content(filename), [Regexp, Symbol], [], false, filename) || {}
end
def yaml(filename)
YAML.safe_load(read_content(filename), permitted_classes: [Regexp, Symbol], filename: filename) || {}
end

private
Expand Down

0 comments on commit 4ec6a7d

Please sign in to comment.