# Spec question

**URL:** <https://www.ruby-forum.com/t/spec-question/142254>\
**Category:** IronRuby\
**Created:** [July 5, 2008, 10:22am UTC](https://www.ruby-forum.com/t/spec-question/142254 "2008-07-05T10:22:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ksunair](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/b19c9b/32.png) [@ksunair](https://www.ruby-forum.com/u/ksunair)\
**Post date:** [July 5, 2008, 10:22am UTC](https://www.ruby-forum.com/t/spec-question/142254/1 "2008-07-05T10:22:55Z")

</div>

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  
Windows?  
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  
work.

Thanks,  
unni
