Hi Can you check what java running under cygwin reports as line-separator? My patch uses the system property line.separator to find out if it needs to change line endings or not.
/O ----- Original Message ----- From: Thomas E Enebo <[EMAIL PROTECTED]> Date: Sunday, June 25, 2006 11:31 pm Subject: Re: [Jruby-devel] Newline problem. To: [EMAIL PROTECTED], jruby-devel@lists.sourceforge.net > So jruby matches the straight cygwin port, but not the installer > version (which has hacks added to make things friendlier in windows): > > > On: i386-cygwin > ------------------------- > Wrote: "abc\ndef\r\nghi\n\rmpq\rrst" > Read: "abc\ndef\r\nghi\n\rmpq\rrst" > Exp: "abc\ndef\nghi\n\rmpq\rrst" > [Fuebo ~]$ c:/opt/workspace/jruby/bin/ruby testLineEndings.rb > sh: c:/opt/workspace/jruby/bin/ruby: No such file or directory > > On: java > ------------------------- > Wrote: "abc\ndef\r\nghi\n\rmpq\rrst" > Read: "abc\ndef\r\nghi\n\rmpq\rrst" > Exp: "abc\ndef\nghi\n\rmpq\rrst" > > On: i386-mswin32 > ------------------------- > Wrote: "abc\ndef\r\nghi\n\rmpq\rrst" > Read: "abc\ndef\nghi\n\rmpq\rrst" > Exp: "abc\ndef\nghi\n\rmpq\rrst" > > Obviously, we want things to working with jruby on windows. The > question I have is: Why does Rails not work on windows with unix > behavior > (I have only seen this problem with one regexp involving multipart > parsing)? > > The things the windows port is doing to Ruby makes Ruby 'the > language'non-portable. I think this is a mistake and I think that > a linux binary > or a windows binary of Ruby should have the same behavior. The fact > that we need to deal with this is going to open a can or worms. > > Ola, can you show an example in Rails where this is a problem? > I have been stuff without your patch and not running into problems > (the error I do know about is something I discovereed in a unit test > and I have not hit it in actual usage). > > -Tom > > On Sun, 25 Jun 2006, Ola Bini defenestrated me: > > > Hi > > > > Yes, that's what I gathered too. And my patch also does it that way, > > comparing the current line.separator to \n and only changing lines > > dynamically then. > > So, the fun thing now is to see Thomas output on his C and JRuby. > > > > /O > > > > ----- Original Message ----- > > From: Charles O Nutter <[EMAIL PROTECTED]> > > Date: Sunday, June 25, 2006 9:22 pm > > Subject: Re: [Jruby-devel] Newline problem. > > To: [EMAIL PROTECTED], jruby-devel@lists.sourceforge.net > > > > > Here's what I get in x86-64 Linux: > > > > > > [EMAIL PROTECTED]:~/testrails/test4# ruby ~/Desktop/testLineEndings.rb > > > On: x86_64-linux > > > ------------------------- > > > Wrote: "abc\ndef\r\nghi\n\rmpq\rrst" > > > Read: "abc\ndef\r\nghi\n\rmpq\rrst" > > > Exp: "abc\ndef\nghi\n\rmpq\rrst" > > > > > > This matches the Java results for you on win32 and for me on > linux. > > > I would > > > expect other Linux versions to act the same. > > > > > > So it would appear that Ruby only normalizes \r\n to \n on read > on > > > win32platforms, yes? > > > > > > On 6/25/06, Ola Bini <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > Hi, I've attached a test case for everyone to try out. When I > run > > > it,> first with C Ruby, then JRuby HEAD, I get this: > > > > > > > > D:\Project\jruby-fn>ruby testLineEndings.rb > > > > On: i386-mswin32 > > > > ------------------------- > > > > Wrote: "abc\ndef\r\nghi\n\rmpq\rrst" > > > > Read: "abc\ndef\nghi\n\rmpq\rrst" > > > > Exp: "abc\ndef\nghi\n\rmpq\rrst" > > > > > > > > D:\Project\jruby-fn>jruby testLineEndings.rb > > > > On: java > > > > ------------------------- > > > > Wrote: "abc\ndef\r\nghi\n\rmpq\rrst" > > > > Read: "abc\ndef\r\nghi\n\rmpq\rrst" > > > > Exp: "abc\ndef\nghi\n\rmpq\rrst" > > > > > > > > Btw, here you can see another point: my RUBY_PLATFORM isn't > exactly> > > win32 at all, rather it's more than that. Probably > speaks well > > > for us > > > > having some platform string like Java-win32 etc? > > > > > > > > /O > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > From: Charles O Nutter <[EMAIL PROTECTED]> > > > > Date: Sunday, June 25, 2006 7:16 pm > > > > Subject: Re: [Jruby-devel] Newline problem. > > > > To: [EMAIL PROTECTED], jruby-devel@lists.sourceforge.net > > > > > > > > > That would probably be a big help. Tom wasn't able to > reproduce > > > the> > issuesyou saw, so if you can put together a test case that > > > > > demonstrates the > > > > > problem, we'll certainly be able to fix it in the next > release.> > > > > > > > > On 6/24/06, Ola Bini <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > Hi, > > > > > > > > > > > > Thomas told me my patch for newlines on Win32 didn't > really > > > work out > > > > > > that well. I have no problem with it on my box, but if > this > > > is a > > > > > stopper> that we want resolved for 0.9, I could write a > small test > > > > > case for > > > > > > people to try out on their respective C and J Ruby's? > > > > > > > > > > > > /O > > > > > > > > > > > > Using Tomcat but need to do more? Need to support web > services,> > > > security?> Get stuff done quickly with pre- > integrated > > > technology to > > > > > make your job > > > > > > easier > > > > > > Download IBM WebSphere Application Server v.1.0.1 based > on > > > Apache> > Geronimo> http://sel.as- > > > > > us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642> > > > > > _______________________________________________> Jruby-devel > > > > > mailing list > > > > > > Jruby-devel@lists.sourceforge.net > > > > > > https://lists.sourceforge.net/lists/listinfo/jruby-devel > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > Charles Oliver Nutter @ headius.blogspot.com > > > > > JRuby Developer @ jruby.sourceforge.net > > > > > Application Architect @ www.ventera.com > > > > > > > > > > > > > > > > > Using Tomcat but need to do more? Need to support web > services, > > > security?> Get stuff done quickly with pre-integrated > technology to > > > make your job > > > > easier > > > > Download IBM WebSphere Application Server v.1.0.1 based on > Apache > > > Geronimo> http://sel.as- > > > us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642> > > > > > > > > _______________________________________________ > > > > Jruby-devel mailing list > > > > Jruby-devel@lists.sourceforge.net > > > > https://lists.sourceforge.net/lists/listinfo/jruby-devel > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > Charles Oliver Nutter @ headius.blogspot.com > > > JRuby Developer @ www.jruby.org > > > Application Architect @ www.ventera.com > > > > > > > Using Tomcat but need to do more? Need to support web services, > security?> Get stuff done quickly with pre-integrated technology to > make your job easier > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo> http://sel.as- > us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642> > _______________________________________________> Jruby-devel > mailing list > > Jruby-devel@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/jruby-devel > > -- > + http://www.tc.umn.edu/~enebo +---- mailto:[EMAIL PROTECTED] ----+ > | Thomas E Enebo, Protagonist | "Luck favors the prepared | > | | mind." -Louis Pasteur | > Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel