Skip to content

Commit

Permalink
Fix #44
Browse files Browse the repository at this point in the history
The problem here was the precedence of `or` vs `||`. Switching to `||` resulted
in the expected behaviour.
  • Loading branch information
halostatue committed Jul 1, 2020
1 parent f7e4544 commit e5cbee7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/diff/lcs/ldiff.rb
Expand Up @@ -105,7 +105,7 @@ def run(args, _input = $stdin, output = $stdout, error = $stderr) #:nodoc:
if @binary.nil?
old_txt = data_old[0, 4096].scan(/\0/).empty?
new_txt = data_new[0, 4096].scan(/\0/).empty?
@binary = !old_txt or !new_txt
@binary = !old_txt || !new_txt
end

unless @binary
Expand Down

0 comments on commit e5cbee7

Please sign in to comment.