Review: File.chmod

GitDiff.bat c71e026eca1134d77a87bd792b1d93c60e32bf81
9fc3048beb4a315ec7ac3dc82908da8f92bf1a07

  •     Implements File.chmod
    
  •     File.readable? should return false if the given filename does 
    

not exist

  •     File.delete should be able to delete a read-only file. This is 
    

implemented by making the file writable first. This is the only solution
I could find.

  •     Added debugger visualizer for RubyObject so that VS will 
    

display the result of to_s in the Watch window.

  •     Adds the wrapper script Merlin\Main\Test\Scritps\ir.cmd so 
    

that the Legacy tests (Ruby\Scripts\test.bat) can pass without any
failures.

Files changed:

Merlin/External/Languages/IronRuby/mspec/ironruby-tags/core/file/chmod_tags.txthttp://github.com/shri/ironruby/commit/9fc3048beb4a315ec7ac3dc82908da8f92bf1a07#diff-0
*
Merlin/External/Languages/IronRuby/mspec/rubyspec/core/file/chmod_spec.rbhttp://github.com/shri/ironruby/commit/9fc3048beb4a315ec7ac3dc82908da8f92bf1a07#diff-1
*
Merlin/External/Languages/IronRuby/mspec/rubyspec/core/file/shared/unlink.rbhttp://github.com/shri/ironruby/commit/9fc3048beb4a315ec7ac3dc82908da8f92bf1a07#diff-2
*
Merlin/External/Languages/IronRuby/mspec/rubyspec/library/zlib/gzipfile/comment_spec.rbhttp://github.com/shri/ironruby/commit/9fc3048beb4a315ec7ac3dc82908da8f92bf1a07#diff-3
*
Merlin/External/Languages/IronRuby/mspec/rubyspec/library/zlib/gzipfile/orig_name_spec.rbhttp://github.com/shri/ironruby/commit/9fc3048beb4a315ec7ac3dc82908da8f92bf1a07#diff-4
*
Merlin/External/Languages/IronRuby/mspec/rubyspec/spec_helper.rbhttp://github.com/shri/ironruby/commit/9fc3048beb4a315ec7ac3dc82908da8f92bf1a07#diff-5
*
Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/FileOps.cshttp://github.com/shri/ironruby/commit/9fc3048beb4a315ec7ac3dc82908da8f92bf1a07#diff-6
*
Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cshttp://github.com/shri/ironruby/commit/9fc3048beb4a315ec7ac3dc82908da8f92bf1a07#diff-7
*
Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Zlib/zlib.cshttp://github.com/shri/ironruby/commit/9fc3048beb4a315ec7ac3dc82908da8f92bf1a07#diff-8
*
Merlin/Main/Languages/Ruby/Ruby/Builtins/RubyObject.cshttp://github.com/shri/ironruby/commit/9fc3048beb4a315ec7ac3dc82908da8f92bf1a07#diff-9
*
Merlin/Main/Test/Scripts/ir.cmdhttp://github.com/shri/ironruby/tree/9fc3048beb4a315ec7ac3dc82908da8f92bf1a07/Merlin/Main/Test/Scripts/ir.cmd
Thanks,
Shri

You can use RubyContext.Inspect in the DebugView.

Other than that code changes look good.

Tomas

From: Curt H.
Sent: Friday, April 03, 2009 10:53 AM
To: Shri B.; IronRuby External Code R.
Cc: [email protected]
Subject: RE: Review: File.chmod

The comment “// TODO: implement this correctly for windows” could
probably be removed; it’s hard to envision chmod doing anything
differently under Windows than what you’ve already implemented.

From: Shri B.
Sent: Friday, April 03, 2009 10:42 AM
To: IronRuby External Code R.
Cc: [email protected]
Subject: Review: File.chmod

GitDiff.bat c71e026eca1134d77a87bd792b1d93c60e32bf81
9fc3048beb4a315ec7ac3dc82908da8f92bf1a07

  •     Implements File.chmod
    
  •     File.readable? should return false if the given filename does 
    

not exist

  •     File.delete should be able to delete a read-only file. This is 
    

implemented by making the file writable first. This is the only solution
I could find.

  •     Added debugger visualizer for RubyObject so that VS will 
    

display the result of to_s in the Watch window.

  •     Adds the wrapper script Merlin\Main\Test\Scritps\ir.cmd so 
    

that the Legacy tests (Ruby\Scripts\test.bat) can pass without any
failures.

Files changed:

Merlin/External/Languages/IronRuby/mspec/ironruby-tags/core/file/chmod_tags.txthttp://github.com/shri/ironruby/commit/9fc3048beb4a315ec7ac3dc82908da8f92bf1a07#diff-0
*
Merlin/External/Languages/IronRuby/mspec/rubyspec/core/file/chmod_spec.rbhttp://github.com/shri/ironruby/commit/9fc3048beb4a315ec7ac3dc82908da8f92bf1a07#diff-1
*
Merlin/External/Languages/IronRuby/mspec/rubyspec/core/file/shared/unlink.rbhttp://github.com/shri/ironruby/commit/9fc3048beb4a315ec7ac3dc82908da8f92bf1a07#diff-2
*
Merlin/External/Languages/IronRuby/mspec/rubyspec/library/zlib/gzipfile/comment_spec.rbhttp://github.com/shri/ironruby/commit/9fc3048beb4a315ec7ac3dc82908da8f92bf1a07#diff-3
*
Merlin/External/Languages/IronRuby/mspec/rubyspec/library/zlib/gzipfile/orig_name_spec.rbhttp://github.com/shri/ironruby/commit/9fc3048beb4a315ec7ac3dc82908da8f92bf1a07#diff-4
*
Merlin/External/Languages/IronRuby/mspec/rubyspec/spec_helper.rbhttp://github.com/shri/ironruby/commit/9fc3048beb4a315ec7ac3dc82908da8f92bf1a07#diff-5
*
Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/FileOps.cshttp://github.com/shri/ironruby/commit/9fc3048beb4a315ec7ac3dc82908da8f92bf1a07#diff-6
*
Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cshttp://github.com/shri/ironruby/commit/9fc3048beb4a315ec7ac3dc82908da8f92bf1a07#diff-7
*
Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Zlib/zlib.cshttp://github.com/shri/ironruby/commit/9fc3048beb4a315ec7ac3dc82908da8f92bf1a07#diff-8
*
Merlin/Main/Languages/Ruby/Ruby/Builtins/RubyObject.cshttp://github.com/shri/ironruby/commit/9fc3048beb4a315ec7ac3dc82908da8f92bf1a07#diff-9
*
Merlin/Main/Test/Scripts/ir.cmdhttp://github.com/shri/ironruby/tree/9fc3048beb4a315ec7ac3dc82908da8f92bf1a07/Merlin/Main/Test/Scripts/ir.cmd
Thanks,
Shri

Test looks good.

JD

From: Tomas M.
Sent: Friday, April 03, 2009 11:00 AM
To: Curt H.; Shri B.; IronRuby External Code R.
Cc: [email protected]
Subject: RE: Review: File.chmod

You can use RubyContext.Inspect in the DebugView.

Other than that code changes look good.

Tomas

From: Curt H.
Sent: Friday, April 03, 2009 10:53 AM
To: Shri B.; IronRuby External Code R.
Cc: [email protected]
Subject: RE: Review: File.chmod

The comment “// TODO: implement this correctly for windows” could
probably be removed; it’s hard to envision chmod doing anything
differently under Windows than what you’ve already implemented.

From: Shri B.
Sent: Friday, April 03, 2009 10:42 AM
To: IronRuby External Code R.
Cc: [email protected]
Subject: Review: File.chmod

GitDiff.bat c71e026eca1134d77a87bd792b1d93c60e32bf81
9fc3048beb4a315ec7ac3dc82908da8f92bf1a07

  •     Implements File.chmod
    
  •     File.readable? should return false if the given filename does 
    

not exist

  •     File.delete should be able to delete a read-only file. This is 
    

implemented by making the file writable first. This is the only solution
I could find.

  •     Added debugger visualizer for RubyObject so that VS will 
    

display the result of to_s in the Watch window.

  •     Adds the wrapper script Merlin\Main\Test\Scritps\ir.cmd so 
    

that the Legacy tests (Ruby\Scripts\test.bat) can pass without any
failures.

Files changed:

Merlin/External/Languages/IronRuby/mspec/ironruby-tags/core/file/chmod_tags.txthttp://github.com/shri/ironruby/commit/9fc3048beb4a315ec7ac3dc82908da8f92bf1a07#diff-0
*
Merlin/External/Languages/IronRuby/mspec/rubyspec/core/file/chmod_spec.rbhttp://github.com/shri/ironruby/commit/9fc3048beb4a315ec7ac3dc82908da8f92bf1a07#diff-1
*
Merlin/External/Languages/IronRuby/mspec/rubyspec/core/file/shared/unlink.rbhttp://github.com/shri/ironruby/commit/9fc3048beb4a315ec7ac3dc82908da8f92bf1a07#diff-2
*
Merlin/External/Languages/IronRuby/mspec/rubyspec/library/zlib/gzipfile/comment_spec.rbhttp://github.com/shri/ironruby/commit/9fc3048beb4a315ec7ac3dc82908da8f92bf1a07#diff-3
*
Merlin/External/Languages/IronRuby/mspec/rubyspec/library/zlib/gzipfile/orig_name_spec.rbhttp://github.com/shri/ironruby/commit/9fc3048beb4a315ec7ac3dc82908da8f92bf1a07#diff-4
*
Merlin/External/Languages/IronRuby/mspec/rubyspec/spec_helper.rbhttp://github.com/shri/ironruby/commit/9fc3048beb4a315ec7ac3dc82908da8f92bf1a07#diff-5
*
Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/FileOps.cshttp://github.com/shri/ironruby/commit/9fc3048beb4a315ec7ac3dc82908da8f92bf1a07#diff-6
*
Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cshttp://github.com/shri/ironruby/commit/9fc3048beb4a315ec7ac3dc82908da8f92bf1a07#diff-7
*
Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Zlib/zlib.cshttp://github.com/shri/ironruby/commit/9fc3048beb4a315ec7ac3dc82908da8f92bf1a07#diff-8
*
Merlin/Main/Languages/Ruby/Ruby/Builtins/RubyObject.cshttp://github.com/shri/ironruby/commit/9fc3048beb4a315ec7ac3dc82908da8f92bf1a07#diff-9
*
Merlin/Main/Test/Scripts/ir.cmdhttp://github.com/shri/ironruby/tree/9fc3048beb4a315ec7ac3dc82908da8f92bf1a07/Merlin/Main/Test/Scripts/ir.cmd
Thanks,
Shri

The comment “// TODO: implement this correctly for windows” could
probably be removed; it’s hard to envision chmod doing anything
differently under Windows than what you’ve already implemented.

From: Shri B.
Sent: Friday, April 03, 2009 10:42 AM
To: IronRuby External Code R.
Cc: [email protected]
Subject: Review: File.chmod

GitDiff.bat c71e026eca1134d77a87bd792b1d93c60e32bf81
9fc3048beb4a315ec7ac3dc82908da8f92bf1a07

  •     Implements File.chmod
    
  •     File.readable? should return false if the given filename does 
    

not exist

  •     File.delete should be able to delete a read-only file. This is 
    

implemented by making the file writable first. This is the only solution
I could find.

  •     Added debugger visualizer for RubyObject so that VS will 
    

display the result of to_s in the Watch window.

  •     Adds the wrapper script Merlin\Main\Test\Scritps\ir.cmd so 
    

that the Legacy tests (Ruby\Scripts\test.bat) can pass without any
failures.

Files changed:

Merlin/External/Languages/IronRuby/mspec/ironruby-tags/core/file/chmod_tags.txthttp://github.com/shri/ironruby/commit/9fc3048beb4a315ec7ac3dc82908da8f92bf1a07#diff-0
*
Merlin/External/Languages/IronRuby/mspec/rubyspec/core/file/chmod_spec.rbhttp://github.com/shri/ironruby/commit/9fc3048beb4a315ec7ac3dc82908da8f92bf1a07#diff-1
*
Merlin/External/Languages/IronRuby/mspec/rubyspec/core/file/shared/unlink.rbhttp://github.com/shri/ironruby/commit/9fc3048beb4a315ec7ac3dc82908da8f92bf1a07#diff-2
*
Merlin/External/Languages/IronRuby/mspec/rubyspec/library/zlib/gzipfile/comment_spec.rbhttp://github.com/shri/ironruby/commit/9fc3048beb4a315ec7ac3dc82908da8f92bf1a07#diff-3
*
Merlin/External/Languages/IronRuby/mspec/rubyspec/library/zlib/gzipfile/orig_name_spec.rbhttp://github.com/shri/ironruby/commit/9fc3048beb4a315ec7ac3dc82908da8f92bf1a07#diff-4
*
Merlin/External/Languages/IronRuby/mspec/rubyspec/spec_helper.rbhttp://github.com/shri/ironruby/commit/9fc3048beb4a315ec7ac3dc82908da8f92bf1a07#diff-5
*
Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/FileOps.cshttp://github.com/shri/ironruby/commit/9fc3048beb4a315ec7ac3dc82908da8f92bf1a07#diff-6
*
Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cshttp://github.com/shri/ironruby/commit/9fc3048beb4a315ec7ac3dc82908da8f92bf1a07#diff-7
*
Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Zlib/zlib.cshttp://github.com/shri/ironruby/commit/9fc3048beb4a315ec7ac3dc82908da8f92bf1a07#diff-8
*
Merlin/Main/Languages/Ruby/Ruby/Builtins/RubyObject.cshttp://github.com/shri/ironruby/commit/9fc3048beb4a315ec7ac3dc82908da8f92bf1a07#diff-9
*
Merlin/Main/Test/Scripts/ir.cmdhttp://github.com/shri/ironruby/tree/9fc3048beb4a315ec7ac3dc82908da8f92bf1a07/Merlin/Main/Test/Scripts/ir.cmd
Thanks,
Shri