Spec question

When I was testing the File.zero? I noticed File.zero?(‘NUL’) failed. I
looked the code and it seems there is no special check there to exclude
NUL as a not a valid file. I created a constant
       private readonly static string NUL_VALUE = “NUL”;

and added a else clause in the trycreate method as

else if (path.Equals(NUL_VALUE))
                   result = null;

and now the NUL works fine for zero.

I have two questions with this regard;

  1. Can I apply these changes and push in the patch?
  2. When we run the rake spec, will it include following tests on
    platform :not, :mswin do
    Â Â Â it “returns true for /dev/null” do
    Â Â Â Â Â File.zero?(’/dev/null’).should == true
    Â Â Â end
    Â end
    It seems it does,

I haven’t looked at the Rubinius to see how the platform is supposed to


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs