Skip to content

Commit

Permalink
Explicitly delegate encoding keyword arguments to File.read (Issue #829)
Browse files Browse the repository at this point in the history
  • Loading branch information
fulf committed Feb 24, 2024
1 parent fca147c commit dbc5c34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/overcommit/hook/pre_commit/rails_schema_up_to_date.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def schema_files
end

def schema
@schema ||= schema_files.map { |file| File.read(file, encoding) }.join
@schema ||= schema_files.map { |file| File.read(file, **(encoding || {})) }.join
@schema.tr('_', '')
end

Expand Down

0 comments on commit dbc5c34

Please sign in to comment.