I'm having some trouble sending to ruby-core, so I'll send this here.  Sorry
for the noise.

----------------------------------------------

I apologize for not being able to supply much information on this one, but
I've noticed some funny behaviour in the pragmatic programmers' Ruby 1.7.3
win32 build, which I've been unable to reproduce in other versions
(including cygwin and linux versions 1.6.x and 1.8).   I don't have the
necessary tools available to compile my own 1.8.0 for win32 (other than
cygwin), so I'll post this here in hopes that someone else does.

In trying to create a Regex that exceeds the maximum buffer size, I get the
following error message in the pragprog build:

C:\>ruby -v -e 'Regexp.new "(\d+)" * 254'
ruby 1.7.3 (2002-11-17) [i386-mswin32]
-e:1:in `initialize': regular expression too big:
/(d+)(d+)(d+)(d+)(d+)(d+)(d+)(
d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(
d+)(
d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(
d+)(
d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(
d+)(
d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(
d+)(
d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(
d+)(
d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+)(d+h@YС颣HO

@#G (RegexpError)
        from -e:1:in `new'
        from -e:1

I'm not surprised that the error is thrown, but I'm surprised by the strange
characters at the end of the regex string.  Looks like ruby is reading off
of the end of the populated buffer.  In the cygwin version I just built out
of the cvs HEAD, I get the expected:

$ ./ruby -v -e 'Regexp.new "(\d+)" * 254'
ruby 1.8.0 (2003-04-17) [i386-cygwin]
-e:1:in `initialize': regular expression too big:
/(d+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        from -e:1:in `new'
        from -e:1

In the admittedly small amount of time that I've spent looking through the
source, I haven't been able to find the potential source of this error.  Can
anyone confirm that this is still an issue (or not) with a more recent win32
build?

Thanks,
Chad