Some blocks are not indented as in the second line in this example. Could you 
indent those please?
+    lambda {
+    @fh = File.new(@file, File::CREAT|File::EXCL)
+  }.should raise_error(Errno::EEXIST)
0

You added try-catch to one of the overloads of RubyFileOps.CreateFile. Could 
you add it to all? Btw, I discussed with Tomas about the fact that many of the 
IO exceptions are defined in IronRuby.Libraries.dll, but RubyFile needs to 
throw those exception from IronRuby.dll. We can move the exceptions that are 
needed in IronRuby.dll into IronRuby.dll. That will avoid having to do a 
try-catch to translate the exception type.  Do you want to add 
Languages\Ruby\Ruby\Builtins\Errno.cs and move some of the exception types 
there?

Thanks,
Shri

From: ironruby-core-boun...@rubyforge.org 
[mailto:ironruby-core-boun...@rubyforge.org] On Behalf Of 
jirapong.na...@gmail.com
Sent: Friday, April 17, 2009 11:40 AM
To: ironruby-core@rubyforge.org
Subject: [Ironruby-core] File.new spec fixes

http://github.com/Jirapong/ironruby/commit/929e07e27183e70a6e4bed8197430ff533610762

Fixes for core\file\new_spec.rb:

 *   File.new raises an Errorno::EEXIST if the file exists when create a new 
file with File::CREAT|File::EXCL

 *   File.new raises an Errno::EINVAL error with File::APPEND
 *   File.new raises an Errno::EINVAL error with File::RDONLY|File::APPEND

Files changed:
            * 
Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/file/new_tags.txt
            * 
Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/rubyspec/core/file/new_spec.rb
            * 
Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/FileOps.cs
            * Merlin/Main/Languages/Ruby/Ruby/Builtins/File.cs

Thank you,
-Jirapong

_______________________________________________
Ironruby-core mailing list
Ironruby-core@rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core

Reply via email to