OK, nobody helped in any way, but I found out why it did that.

The win32 function CharNext has 2 versions ANSI or Unicode and
when you create a project in VS.net it's Unicode by default.
If Unicode is chosen, the function becomes CharNextW which
passes over the null characters because it may detect them as
valid unicode characters.

This function is in ruby.c in push_include used by ruby_incpush.

A cross-platform solution is to replace the line 196, in ruby.c :
for (s = p; *s && *s != sep; s = CharNext(s));
by
for (s = p; *s && *s != sep; ++s);
because s is "const char*" anyway so there is no need for CharNext.

How do I file a bug for Ruby?

Remi Gillig.

PS : I'm using Ruby 1.8.7-p22