Forum: IronRuby Code Review: Update RubySpec

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.
Jim D. (Guest)
on 2009-04-22 07:18
(Received via mailing list)
I'm updating RubySpec to the newest revision from Git. Most of this is
boring stuff; just updating files and rebuilding tags. However, a couple
of these commits are code changes to help the specs run smoother.

JD


*         add ci_files to default.mspec so mspec ci
works<http://github.com/jredville/ironruby/commit/2ef5e8...

*         add a filtered function to mspec to simplify
default.mspec<http://github.com/jredville/ironruby/commit/eb9d20...
***

*         categorizing uncategorized
specs<http://github.com/jredville/ironruby/commit/0845a3...
***

*         removing extra spec
files<http://github.com/jredville/ironruby/commit/d97394...

*         update rubyspec and
mspec<http://github.com/jredville/ironruby/commit/75122c...

*         add a file with the git sha1 hashes of current mspec and
rubyspec<http://github.com/jredville/ironruby/commit/588dcb...

*         implement File.umask in order to run the
specs<http://github.com/jredville/ironruby/commit/61ce27...
***

*         Implement Process.waitall (needed by Process
specs)<http://github.com/jredville/ironruby/commit/f1f148...
***

*         rebuilt ironruby
tags<http://github.com/jredville/ironruby/commit/d176ec...



The commits marked with *** are more than just infrastructure work.
These are actual code changes that need review.



Thanks

JD
Tomas M. (Guest)
on 2009-04-22 11:00
(Received via mailing list)
What is umask supposed to do?

Tomas

From: Jim D.
Sent: Tuesday, April 21, 2009 8:12 PM
To: removed_email_address@domain.invalid; IronRuby External Code R.
Subject: Code Review: Update RubySpec

I'm updating RubySpec to the newest revision from Git. Most of this is
boring stuff; just updating files and rebuilding tags. However, a couple
of these commits are code changes to help the specs run smoother.

JD


*         add ci_files to default.mspec so mspec ci
works<http://github.com/jredville/ironruby/commit/2ef5e8...

*         add a filtered function to mspec to simplify
default.mspec<http://github.com/jredville/ironruby/commit/eb9d20...
***

*         categorizing uncategorized
specs<http://github.com/jredville/ironruby/commit/0845a3...
***

*         removing extra spec
files<http://github.com/jredville/ironruby/commit/d97394...

*         update rubyspec and
mspec<http://github.com/jredville/ironruby/commit/75122c...

*         add a file with the git sha1 hashes of current mspec and
rubyspec<http://github.com/jredville/ironruby/commit/588dcb...

*         implement File.umask in order to run the
specs<http://github.com/jredville/ironruby/commit/61ce27...
***

*         Implement Process.waitall (needed by Process
specs)<http://github.com/jredville/ironruby/commit/f1f148...
***

*         rebuilt ironruby
tags<http://github.com/jredville/ironruby/commit/d176ec...



The commits marked with *** are more than just infrastructure work.
These are actual code changes that need review.



Thanks

JD
Jim D. (Guest)
on 2009-04-22 22:28
(Received via mailing list)
Attachment: temp.rb (0 Bytes)
Umask is a mask on file creation. By itself it does nothing more than
what I've implemented (that I can tell), but File.open (and other file
creation methods) should look at it to derive the default permissions.
The attached script shows the basic idea, and here's it's output:

[9] > ruby .\temp.rb
Umask is 0
100644
Umask is 200
100444
Umask is 400
100644
Umask is 600
100444

If you run it, it will create 4 files (for the 4 tested modes) so you
can see the permissions applied. I looked into adding this support to
File.open, but I'm not certain where to begin (I found public
RuleGenerator Open(), which I don't know enough about yet).

JD

From: Tomas M.
Sent: Wednesday, April 22, 2009 12:00 AM
To: Jim D.; removed_email_address@domain.invalid; IronRuby External Code
Reviewers
Subject: RE: Code Review: Update RubySpec

What is umask supposed to do?

Tomas

From: Jim D.
Sent: Tuesday, April 21, 2009 8:12 PM
To: removed_email_address@domain.invalid; IronRuby External Code R.
Subject: Code Review: Update RubySpec

I'm updating RubySpec to the newest revision from Git. Most of this is
boring stuff; just updating files and rebuilding tags. However, a couple
of these commits are code changes to help the specs run smoother.

JD


*         add ci_files to default.mspec so mspec ci
works<http://github.com/jredville/ironruby/commit/2ef5e8...

*         add a filtered function to mspec to simplify
default.mspec<http://github.com/jredville/ironruby/commit/eb9d20...
***

*         categorizing uncategorized
specs<http://github.com/jredville/ironruby/commit/0845a3...
***

*         removing extra spec
files<http://github.com/jredville/ironruby/commit/d97394...

*         update rubyspec and
mspec<http://github.com/jredville/ironruby/commit/75122c...

*         add a file with the git sha1 hashes of current mspec and
rubyspec<http://github.com/jredville/ironruby/commit/588dcb...

*         implement File.umask in order to run the
specs<http://github.com/jredville/ironruby/commit/61ce27...
***

*         Implement Process.waitall (needed by Process
specs)<http://github.com/jredville/ironruby/commit/f1f148...
***

*         rebuilt ironruby
tags<http://github.com/jredville/ironruby/commit/d176ec...



The commits marked with *** are more than just infrastructure work.
These are actual code changes that need review.



Thanks

JD
Tomas M. (Guest)
on 2009-04-22 23:10
(Received via mailing list)
I see - umask maintains a global state. Any global state maintained by
libraries should be stored on RubyContext, not in static fields. Use
RubyContext.GetOrCreateLibraryData/TryGetLibraryData (if you search the
library you'll find some use cases). Also defining a struct just to
store an integer seems unnecessary (besides it's not good to define
structs with mutable state).

Tomas

From: Jim D.
Sent: Wednesday, April 22, 2009 11:09 AM
To: Tomas M.; removed_email_address@domain.invalid; IronRuby External Code
Reviewers
Subject: RE: Code Review: Update RubySpec

Umask is a mask on file creation. By itself it does nothing more than
what I've implemented (that I can tell), but File.open (and other file
creation methods) should look at it to derive the default permissions.
The attached script shows the basic idea, and here's it's output:

[9] > ruby .\temp.rb
Umask is 0
100644
Umask is 200
100444
Umask is 400
100644
Umask is 600
100444

If you run it, it will create 4 files (for the 4 tested modes) so you
can see the permissions applied. I looked into adding this support to
File.open, but I'm not certain where to begin (I found public
RuleGenerator Open(), which I don't know enough about yet).

JD

From: Tomas M.
Sent: Wednesday, April 22, 2009 12:00 AM
To: Jim D.; removed_email_address@domain.invalid; IronRuby External Code
Reviewers
Subject: RE: Code Review: Update RubySpec

What is umask supposed to do?

Tomas

From: Jim D.
Sent: Tuesday, April 21, 2009 8:12 PM
To: removed_email_address@domain.invalid; IronRuby External Code R.
Subject: Code Review: Update RubySpec

I'm updating RubySpec to the newest revision from Git. Most of this is
boring stuff; just updating files and rebuilding tags. However, a couple
of these commits are code changes to help the specs run smoother.

JD


*         add ci_files to default.mspec so mspec ci
works<http://github.com/jredville/ironruby/commit/2ef5e8...

*         add a filtered function to mspec to simplify
default.mspec<http://github.com/jredville/ironruby/commit/eb9d20...
***

*         categorizing uncategorized
specs<http://github.com/jredville/ironruby/commit/0845a3...
***

*         removing extra spec
files<http://github.com/jredville/ironruby/commit/d97394...

*         update rubyspec and
mspec<http://github.com/jredville/ironruby/commit/75122c...

*         add a file with the git sha1 hashes of current mspec and
rubyspec<http://github.com/jredville/ironruby/commit/588dcb...

*         implement File.umask in order to run the
specs<http://github.com/jredville/ironruby/commit/61ce27...
***

*         Implement Process.waitall (needed by Process
specs)<http://github.com/jredville/ironruby/commit/f1f148...
***

*         rebuilt ironruby
tags<http://github.com/jredville/ironruby/commit/d176ec...



The commits marked with *** are more than just infrastructure work.
These are actual code changes that need review.



Thanks

JD
Jim D. (Guest)
on 2009-04-23 01:32
(Received via mailing list)
Finished offline and F2F with Tomas.

JD

From: Tomas M.
Sent: Wednesday, April 22, 2009 11:33 AM
To: Jim D.; removed_email_address@domain.invalid; IronRuby External Code
Reviewers
Subject: RE: Code Review: Update RubySpec

I see - umask maintains a global state. Any global state maintained by
libraries should be stored on RubyContext, not in static fields. Use
RubyContext.GetOrCreateLibraryData/TryGetLibraryData (if you search the
library you'll find some use cases). Also defining a struct just to
store an integer seems unnecessary (besides it's not good to define
structs with mutable state).

Tomas

From: Jim D.
Sent: Wednesday, April 22, 2009 11:09 AM
To: Tomas M.; removed_email_address@domain.invalid; IronRuby External Code
Reviewers
Subject: RE: Code Review: Update RubySpec

Umask is a mask on file creation. By itself it does nothing more than
what I've implemented (that I can tell), but File.open (and other file
creation methods) should look at it to derive the default permissions.
The attached script shows the basic idea, and here's it's output:

[9] > ruby .\temp.rb
Umask is 0
100644
Umask is 200
100444
Umask is 400
100644
Umask is 600
100444

If you run it, it will create 4 files (for the 4 tested modes) so you
can see the permissions applied. I looked into adding this support to
File.open, but I'm not certain where to begin (I found public
RuleGenerator Open(), which I don't know enough about yet).

JD

From: Tomas M.
Sent: Wednesday, April 22, 2009 12:00 AM
To: Jim D.; removed_email_address@domain.invalid; IronRuby External Code
Reviewers
Subject: RE: Code Review: Update RubySpec

What is umask supposed to do?

Tomas

From: Jim D.
Sent: Tuesday, April 21, 2009 8:12 PM
To: removed_email_address@domain.invalid; IronRuby External Code R.
Subject: Code Review: Update RubySpec

I'm updating RubySpec to the newest revision from Git. Most of this is
boring stuff; just updating files and rebuilding tags. However, a couple
of these commits are code changes to help the specs run smoother.

JD


*         add ci_files to default.mspec so mspec ci
works<http://github.com/jredville/ironruby/commit/2ef5e8...

*         add a filtered function to mspec to simplify
default.mspec<http://github.com/jredville/ironruby/commit/eb9d20...
***

*         categorizing uncategorized
specs<http://github.com/jredville/ironruby/commit/0845a3...
***

*         removing extra spec
files<http://github.com/jredville/ironruby/commit/d97394...

*         update rubyspec and
mspec<http://github.com/jredville/ironruby/commit/75122c...

*         add a file with the git sha1 hashes of current mspec and
rubyspec<http://github.com/jredville/ironruby/commit/588dcb...

*         implement File.umask in order to run the
specs<http://github.com/jredville/ironruby/commit/61ce27...
***

*         Implement Process.waitall (needed by Process
specs)<http://github.com/jredville/ironruby/commit/f1f148...
***

*         rebuilt ironruby
tags<http://github.com/jredville/ironruby/commit/d176ec...



The commits marked with *** are more than just infrastructure work.
These are actual code changes that need review.



Thanks

JD
This topic is locked and can not be replied to.