Yeah, I couldn't get yaml.rb to load naturally until I put ut in src/lib/ruby/1.8 instead of under builtin. Of course, I'm not really sure about how things are being loaded in JRuby anyway, so that may be the wrong approach. I did get it to run a lot of the generate stuff, and then as I mentioned it blew up trying to set a variable in Scope that wasn't there...looked like an interpreter bug so it's right up my alley.
The regex fix was to make it handle Ruby's regex octal format correctly. There are a couple regexps at the top of RubyRegexp designed to properly format single-digit hex and octal sequences, but they also need to handle octal sequences where the first character is not a zero. In Ruby's regexps, this is valid...in Java's, not. The specific regexp that was blowing up looked like this: [\000-\011\013\014\016-\037\117\377] The 117 and 377 are invalid sequences in Java, since all octals must be preceded by a zero. My fix to the RubyRegexp.OCTAL_SINGLE_DIGIT_PATTERN regexp: "\\\\(0|[1-7]+)" causes all octal sequences encountered to get an extra zero, so they work (but it should obviously not add them where not needed). The regexp above that was failing then looks like: [\0000-\0011\0013\0014\0016-\0037\0117\0377] It worked, but it's not ideal. I should have a better patch this evening. - Charlie On 1/24/06, David Corbin <[EMAIL PROTECTED]> wrote: > On Tuesday 24 January 2006 11:07 am, Charles O Nutter wrote: > > That is the same point I have gotten it to. I needed to move yaml.rb > > somewhere so it would load rather than Ruby 1.8's yaml.rb (which tries > > to load syck). So I'm at the same point you got to. I did need the > > SmartFile patch because of stupid windows backslashes; you probably > > avoided those issues by running under Linux. > > > > I also *almost* got rails "generate" command to run completely. There > > was a minor fix required to regexp, and then the next stumbling block > > is an interpreter bug somewhere I need to hunt down. But it's close. > > What was the fix to regex? > > > > > David, if you're out there...what approach did you take to getting > > Rails up? I'm following a fairly stock approach, trying to fix as I > > go. > > Well, I never really got rails "up". I got past the syck problem, because I > included the pure-ruby yaml.rb that someone had. It's committed, and I > thought it would load "naturally", but apparently not. > > ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642 _______________________________________________ Jruby-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jruby-devel
