Issue #3299 has been updated by Romulo Ceccon.


> It works fine with cygwin sed for me, what version of sed do
> you use?

I use the version from http://gnuwin32.sourceforge.net (Sed-4.2). But the likely problem is that you're testing under a Cygwin shell, while I'm testing from the native Windows shell (cmd.exe). So the sed command line works for you, but not for me. For example, the first expression ('/^URL:/{') is understood by the Cygwin shell as a quoted string, and sed receives /^URL:/{ (without quotes) as the argument. Cmd.exe does not interpret ' as a special character, so it passes '/^URL:/{' (with quotes) as the argument to sed. Sed.exe then fails with:

  sed: -e expression #1, character 1: unknown command: '''  [translated from Portuguese]

Replacing ' by " would be enough if the third expression didn't have a " inside. I couldn't come up with an inline string which would work in both Windows and Posix systems. (Well, actually I did come up with one, but it worked only when executed from the shell, and not through the Makefile. At that point I thought that adding an additional layer of character escaping (to satisfy make/nmake rules) would make the expressions unreadable.) So I moved them to a separate file.

----------------------------------------
http://redmine.ruby-lang.org/issues/show/3299

----------------------------------------
http://redmine.ruby-lang.org