Index: RubyRegexp.java
===================================================================
RCS file: /cvsroot/jruby/jruby/src/org/jruby/RubyRegexp.java,v
retrieving revision 1.24.2.2
diff -u -r1.24.2.2 RubyRegexp.java
--- RubyRegexp.java	22 Jan 2006 05:05:39 -0000	1.24.2.2
+++ RubyRegexp.java	26 Jan 2006 05:24:49 -0000
@@ -50,6 +50,7 @@
     private static final Pattern COMMENT_PATTERN = Pattern.compile("\\(\\?#[^)]*\\)");
     private static final Pattern HEX_SINGLE_DIGIT_PATTERN = Pattern.compile("\\\\x(\\p{XDigit})(?!\\p{XDigit})");
     private static final Pattern OCTAL_SINGLE_DIGIT_PATTERN = Pattern.compile("\\\\([0-7])(?![0-7])");
+    private static final Pattern OCTAL_MISSING_ZERO_PATTERN = Pattern.compile("\\\\([1-7][0-7]+)");
     /** Class which represents the multibyte character set code.
 	 * (should be an enum in Java 5.0).
 	 * 
@@ -152,6 +153,7 @@
         regex = COMMENT_PATTERN.matcher(regex).replaceAll("");
         regex = HEX_SINGLE_DIGIT_PATTERN.matcher(regex).replaceAll("\\\\"+"x0$1");
         regex = OCTAL_SINGLE_DIGIT_PATTERN.matcher(regex).replaceAll("\\\\"+"0$1");
+        regex = OCTAL_MISSING_ZERO_PATTERN.matcher(regex).replaceAll("\\\\"+"0$1");
         pattern = Pattern.compile(regex, flags | this.code.flags());
     }
 
