Created
March 19, 2011 13:12
-
-
Save irohiroki/877470 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/guard/spork/fake_spawn.rb b/lib/guard/spork/fake_spawn.rb | |
new file mode 100644 | |
index 0000000..8551778 | |
--- /dev/null | |
+++ b/lib/guard/spork/fake_spawn.rb | |
@@ -0,0 +1,7 @@ | |
+module FakeSpawn | |
+ if RUBY_VERSION < '1.9' | |
+ def spawn(cmd) | |
+ system(cmd + ' >/dev/null 2>&1 < /dev/null &') | |
+ end | |
+ end | |
+end | |
diff --git a/lib/guard/spork/runner.rb b/lib/guard/spork/runner.rb | |
index 51a32e9..2c51a20 100644 | |
--- a/lib/guard/spork/runner.rb | |
+++ b/lib/guard/spork/runner.rb | |
@@ -1,8 +1,10 @@ | |
require 'socket' | |
+require 'guard/spork/fake_spawn' | |
module Guard | |
class Spork | |
class Runner | |
+ include FakeSpawn | |
attr_accessor :options | |
def initialize(options = {}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment