diff options
author | Austin Ziegler <austin@zieglers.ca> | 2021-12-23 10:58:14 -0500 |
---|---|---|
committer | Austin Ziegler <austin@zieglers.ca> | 2022-07-04 20:26:10 -0400 |
commit | 22303f04b44d97455b5c862176d2d93c02a2b2ba (patch) | |
tree | e1cc8639e6aaa5991bbf00f453fe98ed84648df5 /lib/diff/lcs/ldiff.rb | |
parent | f5781c06b2c297caf58c97824c77f557831094a7 (diff) | |
download | diff-lcs-22303f04b44d97455b5c862176d2d93c02a2b2ba.tar.gz |
Fix Style/AndOr
Diffstat (limited to 'lib/diff/lcs/ldiff.rb')
-rw-r--r-- | lib/diff/lcs/ldiff.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/diff/lcs/ldiff.rb b/lib/diff/lcs/ldiff.rb index 59625aa..1896203 100644 --- a/lib/diff/lcs/ldiff.rb +++ b/lib/diff/lcs/ldiff.rb @@ -130,7 +130,7 @@ class << Diff::LCS::Ldiff return 1 end - if (@format == :unified) or (@format == :context) + if (@format == :unified) || (@format == :context) ft = File.stat(file_old).mtime.localtime.strftime("%Y-%m-%d %H:%M:%S.000000000 %z") output << "#{char_old} #{file_old}\t#{ft}\n" ft = File.stat(file_new).mtime.localtime.strftime("%Y-%m-%d %H:%M:%S.000000000 %z") @@ -152,7 +152,7 @@ class << Diff::LCS::Ldiff file_length_difference = hunk.file_length_difference next unless oldhunk - next if @lines.positive? and hunk.merge(oldhunk) + next if @lines.positive? && hunk.merge(oldhunk) output << oldhunk.diff(@format) output << "\n" if @format == :unified |