Forum: IronRuby Review: File.chmod

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Shri B. (Guest)
on 2009-04-03 22:35
(Received via mailing list)
http://github.com/shri/ironruby/commit/9fc3048beb4...
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.txt<http://github.com/shri/ironruby/commit/9fc3048beb4...
 *
Merlin/External/Languages/IronRuby/mspec/rubyspec/core/file/chmod_spec.rb<http://github.com/shri/ironruby/commit/9fc3048beb4...
 *
Merlin/External/Languages/IronRuby/mspec/rubyspec/core/file/shared/unlink.rb<http://github.com/shri/ironruby/commit/9fc3048beb4...
 *
Merlin/External/Languages/IronRuby/mspec/rubyspec/library/zlib/gzipfile/comment_spec.rb<http://github.com/shri/ironruby/commit/9fc3048beb4...
 *
Merlin/External/Languages/IronRuby/mspec/rubyspec/library/zlib/gzipfile/orig_name_spec.rb<http://github.com/shri/ironruby/commit/9fc3048beb4...
 *
Merlin/External/Languages/IronRuby/mspec/rubyspec/spec_helper.rb<http://github.com/shri/ironruby/commit/9fc3048beb4...
 *
Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/FileOps.cs<http://github.com/shri/ironruby/commit/9fc3048beb4...
 *
Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs<http://github.com/shri/ironruby/commit/9fc3048beb4...
 *
Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Zlib/zlib.cs<http://github.com/shri/ironruby/commit/9fc3048beb4...
 *
Merlin/Main/Languages/Ruby/Ruby/Builtins/RubyObject.cs<http://github.com/shri/ironruby/commit/9fc3048beb4...
 *
Merlin/Main/Test/Scripts/ir.cmd<http://github.com/shri/ironruby/tree/9fc3048beb4a3...
Thanks,
Shri
Curt H. (Guest)
on 2009-04-03 22:41
(Received via mailing list)
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: removed_email_address@domain.invalid
Subject: Review: File.chmod

http://github.com/shri/ironruby/commit/9fc3048beb4...
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.txt<http://github.com/shri/ironruby/commit/9fc3048beb4...
 *
Merlin/External/Languages/IronRuby/mspec/rubyspec/core/file/chmod_spec.rb<http://github.com/shri/ironruby/commit/9fc3048beb4...
 *
Merlin/External/Languages/IronRuby/mspec/rubyspec/core/file/shared/unlink.rb<http://github.com/shri/ironruby/commit/9fc3048beb4...
 *
Merlin/External/Languages/IronRuby/mspec/rubyspec/library/zlib/gzipfile/comment_spec.rb<http://github.com/shri/ironruby/commit/9fc3048beb4...
 *
Merlin/External/Languages/IronRuby/mspec/rubyspec/library/zlib/gzipfile/orig_name_spec.rb<http://github.com/shri/ironruby/commit/9fc3048beb4...
 *
Merlin/External/Languages/IronRuby/mspec/rubyspec/spec_helper.rb<http://github.com/shri/ironruby/commit/9fc3048beb4...
 *
Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/FileOps.cs<http://github.com/shri/ironruby/commit/9fc3048beb4...
 *
Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs<http://github.com/shri/ironruby/commit/9fc3048beb4...
 *
Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Zlib/zlib.cs<http://github.com/shri/ironruby/commit/9fc3048beb4...
 *
Merlin/Main/Languages/Ruby/Ruby/Builtins/RubyObject.cs<http://github.com/shri/ironruby/commit/9fc3048beb4...
 *
Merlin/Main/Test/Scripts/ir.cmd<http://github.com/shri/ironruby/tree/9fc3048beb4a3...
Thanks,
Shri
Tomas M. (Guest)
on 2009-04-03 23:24
(Received via mailing list)
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: removed_email_address@domain.invalid
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: removed_email_address@domain.invalid
Subject: Review: File.chmod

http://github.com/shri/ironruby/commit/9fc3048beb4...
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.txt<http://github.com/shri/ironruby/commit/9fc3048beb4...
 *
Merlin/External/Languages/IronRuby/mspec/rubyspec/core/file/chmod_spec.rb<http://github.com/shri/ironruby/commit/9fc3048beb4...
 *
Merlin/External/Languages/IronRuby/mspec/rubyspec/core/file/shared/unlink.rb<http://github.com/shri/ironruby/commit/9fc3048beb4...
 *
Merlin/External/Languages/IronRuby/mspec/rubyspec/library/zlib/gzipfile/comment_spec.rb<http://github.com/shri/ironruby/commit/9fc3048beb4...
 *
Merlin/External/Languages/IronRuby/mspec/rubyspec/library/zlib/gzipfile/orig_name_spec.rb<http://github.com/shri/ironruby/commit/9fc3048beb4...
 *
Merlin/External/Languages/IronRuby/mspec/rubyspec/spec_helper.rb<http://github.com/shri/ironruby/commit/9fc3048beb4...
 *
Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/FileOps.cs<http://github.com/shri/ironruby/commit/9fc3048beb4...
 *
Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs<http://github.com/shri/ironruby/commit/9fc3048beb4...
 *
Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Zlib/zlib.cs<http://github.com/shri/ironruby/commit/9fc3048beb4...
 *
Merlin/Main/Languages/Ruby/Ruby/Builtins/RubyObject.cs<http://github.com/shri/ironruby/commit/9fc3048beb4...
 *
Merlin/Main/Test/Scripts/ir.cmd<http://github.com/shri/ironruby/tree/9fc3048beb4a3...
Thanks,
Shri
Jim D. (Guest)
on 2009-04-04 00:53
(Received via mailing list)
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: removed_email_address@domain.invalid
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: removed_email_address@domain.invalid
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: removed_email_address@domain.invalid
Subject: Review: File.chmod

http://github.com/shri/ironruby/commit/9fc3048beb4...
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.txt<http://github.com/shri/ironruby/commit/9fc3048beb4...
  *
Merlin/External/Languages/IronRuby/mspec/rubyspec/core/file/chmod_spec.rb<http://github.com/shri/ironruby/commit/9fc3048beb4...
  *
Merlin/External/Languages/IronRuby/mspec/rubyspec/core/file/shared/unlink.rb<http://github.com/shri/ironruby/commit/9fc3048beb4...
  *
Merlin/External/Languages/IronRuby/mspec/rubyspec/library/zlib/gzipfile/comment_spec.rb<http://github.com/shri/ironruby/commit/9fc3048beb4...
  *
Merlin/External/Languages/IronRuby/mspec/rubyspec/library/zlib/gzipfile/orig_name_spec.rb<http://github.com/shri/ironruby/commit/9fc3048beb4...
  *
Merlin/External/Languages/IronRuby/mspec/rubyspec/spec_helper.rb<http://github.com/shri/ironruby/commit/9fc3048beb4...
  *
Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/FileOps.cs<http://github.com/shri/ironruby/commit/9fc3048beb4...
  *
Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs<http://github.com/shri/ironruby/commit/9fc3048beb4...
  *
Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Zlib/zlib.cs<http://github.com/shri/ironruby/commit/9fc3048beb4...
  *
Merlin/Main/Languages/Ruby/Ruby/Builtins/RubyObject.cs<http://github.com/shri/ironruby/commit/9fc3048beb4...
  *
Merlin/Main/Test/Scripts/ir.cmd<http://github.com/shri/ironruby/tree/9fc3048beb4a3...
Thanks,
Shri
This topic is locked and can not be replied to.