diff --git a/lib/guard/listeners/linux.rb b/lib/guard/listeners/linux.rb index 2876514..465d2d0 100644 --- a/lib/guard/listeners/linux.rb +++ b/lib/guard/listeners/linux.rb @@ -45,8 +45,8 @@ module Guard def watch_change while !@stop - if IO.select([notifier.to_io], [], [], latency) - notifier.process + if IO.select([inotify.to_io], [], [], latency) + inotify.process unless files.empty? files.map! { |file| file.gsub("#{Dir.pwd}/", '') } diff --git a/spec/guard/listeners/linux_spec.rb b/spec/guard/listeners/linux_spec.rb index 55e1a26..25736db 100644 --- a/spec/guard/listeners/linux_spec.rb +++ b/spec/guard/listeners/linux_spec.rb @@ -12,7 +12,7 @@ describe Guard::Linux do if linux? it "should be usable on linux" do - subject.should_not be_usable + subject.should be_usable end describe "watch" do