Skip to content

Commit

Permalink
Fix unused variable warnings
Browse files Browse the repository at this point in the history
If used in combination with `ruby -w`, the unused `stderr` & `process_status`
variables causes a warning. Prefixing it with an underscore tells Ruby we're
doing it intentionally and avoids the warning.
  • Loading branch information
sambostock committed Jun 20, 2022
1 parent 56fd935 commit 4e76670
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/diffy/diff.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def diff
[string1, string2]
end

diff, stderr, process_status = Open3.capture3(diff_bin, *(diff_options + @paths))
diff, _stderr, process_status = Open3.capture3(diff_bin, *(diff_options + @paths))
diff.force_encoding('ASCII-8BIT') if diff.respond_to?(:valid_encoding?) && !diff.valid_encoding?
if diff =~ /\A\s*\Z/ && !options[:allow_empty_diff]
diff = case options[:source]
Expand Down

0 comments on commit 4e76670

Please sign in to comment.