Skip to content

Commit 79db32e

Browse files
committed
issue #548: refactor to add () around include? args
1 parent 177125d commit 79db32e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/listen/directory.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def self.scan(snapshot, rel_path, options)
3636
end
3737

3838
# TODO: this is not tested properly
39-
previous = previous.reject { |entry, _| current.include? path + entry }
39+
previous = previous.reject { |entry, _| current.include?(path + entry) }
4040

4141
_async_changes(snapshot, Pathname.new(rel_path), previous, options)
4242
rescue Errno::ENOENT, Errno::EHOSTDOWN

lib/listen/record.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def unset_path(rel_path)
3535

3636
def file_data(rel_path)
3737
dirname, basename = Pathname(rel_path).split.map(&:to_s)
38-
if [nil, '', '.'].include? dirname
38+
if [nil, '', '.'].include?(dirname)
3939
@tree[basename] ||= {}
4040
@tree[basename].dup
4141
else
@@ -46,7 +46,7 @@ def file_data(rel_path)
4646
end
4747

4848
def dir_entries(rel_path)
49-
subtree = if ['', '.'].include? rel_path.to_s
49+
subtree = if ['', '.'].include?(rel_path.to_s)
5050
@tree
5151
else
5252
@tree[rel_path.to_s] ||= _auto_hash

0 commit comments

Comments
 (0)