ruby-modeのflymakeでguardが誤動作しないようにする

最近rubyのテスト環境をautotestからguardベースに切り替えた。
(guard自体の説明はそのうち書く。)
Test::Unit(というかshoulda)を使っているので、GitHub - guard/guard-test: Guard::Test automatically run your tests (much like autotest)を使用していたのだが、2回に1回ぐらいエラーをはいて止まってしまう。
どうもおかしいなと思ったら、

/test/test_helper_flymake.rb (LoadError)

みたいなエラーが出ていた。
どうやらEmacsのFlymakeの設定が悪かったらしい。
Flymakeの実行時に一時ファイルを作るのだが、そのイベントを拾っても一時ファイルが消されているためエラーになっている様子。
同じ階層(test)にtempファイルを作らないように(?)flymake-ruby-initを以下のようにしたらエラーで止まることがなくなった。

  (defun flymake-ruby-init ()
    (let* ((temp-file   (flymake-init-create-temp-buffer-copy
			 'flymake-create-temp-with-folder-structure))
	   (local-file  (file-relative-name
			 temp-file
			 (file-name-directory buffer-file-name))))
      (list "ruby" (list "-c" local-file))))

EmacsWiki: Flymake Rubyとのdiffはこんな感じ

  (defun flymake-ruby-init ()
    (let* ((temp-file   (flymake-init-create-temp-buffer-copy
+			 'flymake-create-temp-with-folder-structure))
-			 'flymake-create-temp-inplace))
	   (local-file  (file-relative-name
			 temp-file
			 (file-name-directory buffer-file-name))))
      (list "ruby" (list "-c" local-file))))

tempファイルがどこに作られるようになったかは謎だけど。。。

追記:過去にautotestでも問題になっていた様子。
http://www.tomtenthij.com/2007/12/10/emacs-flymake-and-autotest-the-fix
guard(guard-test)側に手を入れるのが確実なのかな。。。