Yeah I am hoping to apply this tommorow during some anticipated
downtime. It seems fairly obvious we should not be apply CWD changes
to File::Stat (so this is bound to be better than our current code
there).
-Tom
On Mon, 29 May 2006, Charles O Nutter defenestrated me:
>
> Tom and I have been kicking around a similar approach for a while.
> We'll have a look at your patch and get back to you. The whole CWD
> thing is still evolving in JRuby (since until a couple months ago it
> wasn't even there) but this sounds like a good way to do it.
>
> On 5/28/06, Ola Bini <[EMAIL PROTECTED]> wrote:
>
> Hi.
> I've spent some time trying to fix alot of the
> java.util.File-related
> issues, and fixed some stuff. I can now locally install the rake
> gem,
> including docs without error. I think I've fixed most of the CWD
> error,
> but I'm not sure if it will work better in multi-threaded places.
> Ok, what I've done is this:
> Create a new class org.jruby.util.JRubyFile, which mostly mirrors
> NormalizedFile, but ALWAYS demands either an absolute path or a
> valid
> CWD as parameter when created. (This mirror Ruby conventions for
> files.
> For example, try x = File.new("lib"), Dir.chdir ".." and then
> x.read,
> and this will still work, so obviously File.new captures the CWD
> when
> it's created.
> I've changed most classes to use JRubyFile instead. The exceptions
> to
> this is Glob, RbConfigLibrary and LoadService, but these places are
> self
> contained and it was hard to find out what semantics was needed.
> There is also a fix for the RubyFileStat here, not complete though.
> I've
> added defineMethods for ALL methods it should have, but commented
> out
> most right now, until there is time to implement. I have also made
> the
> semantics right, so it captures the File::Stat information at
> creation
> time and throws an exception if the File does not exist.
> Take a look and see if it works out!
> Regards
> Ola Bini
>
> --
> Charles Oliver Nutter @ [2]headius.blogspot.com
> JRuby Developer @ [3]jruby.sourceforge.net
> Application Architect @ [4]www.ventera.com
>
> References
>
> 1. mailto:[EMAIL PROTECTED]
> 2. http://headius.blogspot.com/
> 3. http://jruby.sourceforge.net/
> 4. http://www.ventera.com/
--
+ http://www.tc.umn.edu/~enebo +---- mailto:[EMAIL PROTECTED] ----+
| Thomas E Enebo, Protagonist | "Luck favors the prepared |
| | mind." -Louis Pasteur |
-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
Jruby-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jruby-devel