Re: [Jruby-devel] Suggestion for an ENV implementation

2006-02-14 Thread Tim Azzopardi
If anybody is interested... The attached patch is a first stab at a pluggable ENV implementation with reasonable default implementations. The Java5 System.getenv method is tried first by reflection and then if its unavailable it falls through to the "set/env > ~/.jrubyenv" method. (Only jrub

Re: [Jruby-devel] Suggestion for an ENV implementation

2006-02-14 Thread Tim Azzopardi
Neil, This is a very good point. I think this means that the Runtime.exec() approach is a last resort solution compared to the others. Tim Galarneau, Neil wrote: It seems to me that the Runtime.exec() approach is not guaranteed to find the actual value of the environment variable, only some

[Jruby-devel] Re: Problem with block-local variables and eval

2006-02-14 Thread Charles O Nutter
Well this is definitely a bug, and I think it's related to the parser. Clues: - The parser determines dvar versus lvar at parse time, using ParserSupport's localNamesStack. As blocks are entered and exited, the topmost LocalNamesElement is modified appropriately. When a bare identifier is encount

[Jruby-devel] Issues with octal sequences in regexp translator

2006-02-14 Thread Charles O Nutter
It seems something isn't quite right. This stack trace is from running Rails's generate script: java.util.regex.PatternSyntaxException: Illegal octal escape sequence near index 2 \0 ^ at java.util.regex.Pattern.error(Pattern.java:1541) at java.util.regex.Pattern.o(Pattern.java:25