rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / Atom feed
* jruby Rack::Reloader exception
@ 2009-07-22 18:08 Maksym Parkachov
  0 siblings, 0 replies; only message in thread
From: Maksym Parkachov @ 2009-07-22 18:08 UTC (permalink / raw)
  To: Rack Development


Hi folks,

I was trying to use Rack::Reloader with jruby + Sinatra and got
exception,
which is not happening with C ruby. The problem lies with
$LOADED_FEATURES
where jruby lists the same files as C ruby, but some of them are not
in the file system
as they implemented with java. The patch below fixes the problem.

Cheers,
Maksym.

P.S. I don't really know how to proper format patch, so, just sending
git diff output.

diff --git a/lib/rack/reloader.rb b/lib/rack/reloader.rb
index 3b962c4..c3d12ec 100644
--- a/lib/rack/reloader.rb
+++ b/lib/rack/reloader.rb
@@ -93,6 +93,7 @@ module Rack
           found, stat = safe_stat(path)
           return ::File.expand_path(found), stat if found
         end
+        return false, false
       end

       def safe_stat(file)

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-07-22 18:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-22 18:08 jruby Rack::Reloader exception Maksym Parkachov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).