Skip to content

Commit

Permalink
issue guard#572: switch Kernel.warn and warn to adapter_warn
Browse files Browse the repository at this point in the history
  • Loading branch information
ColinDKelley committed Feb 23, 2024
1 parent cb8c9c5 commit e688838
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/listen/adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def _usable_adapter_class

def _warn_polling_fallback(options)
msg = options.fetch(:polling_fallback_message, POLLING_FALLBACK_MESSAGE)
Kernel.warn "[Listen warning]:\n #{msg}" if msg
Listen.adapter_warn("[Listen warning]:\n #{msg}") if msg
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/listen/adapter/bsd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def self.usable?
require 'find'
true
rescue LoadError
Kernel.warn BUNDLER_DECLARE_GEM
Listen.adapter_warn(BUNDLER_DECLARE_GEM)
false
end

Expand Down
2 changes: 1 addition & 1 deletion lib/listen/adapter/darwin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def self.usable?
require 'rb-fsevent'
fsevent_version = Gem::Version.new(FSEvent::VERSION)
return true if fsevent_version <= Gem::Version.new('0.9.4')
Kernel.warn INCOMPATIBLE_GEM_VERSION
Listen.adapter_warn(INCOMPATIBLE_GEM_VERSION)
false
end

Expand Down
2 changes: 1 addition & 1 deletion lib/listen/adapter/windows.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def self.usable?
Listen.logger.debug format('wdm - load failed: %s:%s', $ERROR_INFO,
$ERROR_POSITION * "\n")

Kernel.warn BUNDLER_DECLARE_GEM
Listen.adapter_warn(BUNDLER_DECLARE_GEM)
false
end

Expand Down
2 changes: 1 addition & 1 deletion lib/listen/record/symlink_detector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def verify_unwatched!(entry)
private

def _fail(symlinked, real_path)
warn(format(SYMLINK_LOOP_ERROR, symlinked, real_path))
Listen.adapter_warn(format(SYMLINK_LOOP_ERROR, symlinked, real_path))
raise ::Listen::Error::SymlinkLoop, 'Failed due to looped symlinks'
end
end
Expand Down

0 comments on commit e688838

Please sign in to comment.