Skip to content

Commit

Permalink
Merge pull request #417 from jirutka/fix-rb-fsevent
Browse files Browse the repository at this point in the history
Don't require rb-fsevent until actually needed
  • Loading branch information
rymai authored Nov 20, 2016
2 parents e1a4e0d + 187aaab commit 0559f98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/listen/adapter/darwin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ class Darwin < Base
EOS

def self.usable?
require 'rb-fsevent'
version = RbConfig::CONFIG['target_os'][OS_REGEXP, :major_version]
return false unless version
return true if version.to_i >= 13 # darwin13 is OS X 10.9

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
Expand Down

0 comments on commit 0559f98

Please sign in to comment.