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.
Aea6cfe04952626ab630bde47ff82f89?d=identicon&s=25 Shri Borde (Guest)
on 2009-04-03 20: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
F983f0c990cba2fe743ef62a975ec99c?d=identicon&s=25 Curt Hagenlocher (Guest)
on 2009-04-03 20: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 Borde
Sent: Friday, April 03, 2009 10:42 AM
To: IronRuby External Code Reviewers
Cc: ironruby-core@rubyforge.org
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
Cb51033949ffccd982ae32c9f890f25a?d=identicon&s=25 Tomas Matousek (Guest)
on 2009-04-03 21:24
(Received via mailing list)
You can use RubyContext.Inspect in the DebugView.

Other than that code changes look good.

Tomas

From: Curt Hagenlocher
Sent: Friday, April 03, 2009 10:53 AM
To: Shri Borde; IronRuby External Code Reviewers
Cc: ironruby-core@rubyforge.org
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 Borde
Sent: Friday, April 03, 2009 10:42 AM
To: IronRuby External Code Reviewers
Cc: ironruby-core@rubyforge.org
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
Ade8632553a9243ae05fc920f68644c1?d=identicon&s=25 Jim Deville (Guest)
on 2009-04-03 22:53
(Received via mailing list)
Test looks good.

JD

From: Tomas Matousek
Sent: Friday, April 03, 2009 11:00 AM
To: Curt Hagenlocher; Shri Borde; IronRuby External Code Reviewers
Cc: ironruby-core@rubyforge.org
Subject: RE: Review: File.chmod

You can use RubyContext.Inspect in the DebugView.

Other than that code changes look good.

Tomas

From: Curt Hagenlocher
Sent: Friday, April 03, 2009 10:53 AM
To: Shri Borde; IronRuby External Code Reviewers
Cc: ironruby-core@rubyforge.org
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 Borde
Sent: Friday, April 03, 2009 10:42 AM
To: IronRuby External Code Reviewers
Cc: ironruby-core@rubyforge.org
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.