From: ts Date: 2004-05-25T01:15:56+09:00 Subject: Re: compiling mmap? >>>>> "M" == Mark Hubbart writes: M> test_13_div(TestMmap) [mmapt.rb:304]: M> empty. M> expected but was M> . Well, it's normal : the test is not adapted with "rw" it will not truncate the file. This is not the good correction, try with svg% diff -u mmap.c~ mmap.c --- mmap.c~ 2004-05-24 11:20:04.000000000 +0200 +++ mmap.c 2004-05-24 18:13:45.000000000 +0200 @@ -420,10 +420,7 @@ } else if (strcmp(mode, "w") == 0) { smode = O_RDWR | O_TRUNC; - pmode = PROT_WRITE; - if (!NIL_P(fdv)) { - pmode |= PROT_READ; - } + pmode = PROT_READ | PROT_WRITE; } else if (strcmp(mode, "rw") == 0 || strcmp(mode, "wr") == 0) { smode = O_RDWR; svg% and in tests/mmapt.rb reverse the modification assert_kind_of(Mmap, m1 = Mmap.new("tmp/bb", "w"), "new a") Now, why it need PROT_READ ??? Guy Decoux