Could you remove

public static MutableString/*!*/ CanonicalizePath(MutableString/*!*/ path) {
   return RubyUtils.CanonicalizePath(path);
}

from Glob and call RubyUtils directly wherever Glob.CanonicalizePath is used?

Other than that looks good.

Tomas


From: Jimmy Schementi
Sent: Tuesday, April 21, 2009 5:19 PM
To: Jim Deville; ironruby-core@rubyforge.org
Cc: IronRuby External Code Reviewers
Subject: RE: Code Review: __FILE__ and $PROGRAM_NAME paths

http://github.com/jschementi/ironruby/commit/57d18b591ba9cba92923864936f359de446e2f97

Code Review changes
- Moves command_line/fixtures/file* and language/fixtures/file* to fixtures/
- Create RubyUtils.CanonicalizePath, to dependency on IronRuby.Builtins.Glob 
from IronRuby.Hosting

    * 
Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/rubyspec/command_line/fixtures/file.rb
    * 
Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/rubyspec/command_line/fixtures/file/sub.rb
    * 
Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/rubyspec/command_line/program_name_spec.rb
    * 
Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/rubyspec/fixtures/file.rb
    * 
Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/rubyspec/fixtures/file/sub.rb
    * 
Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/rubyspec/language/file_spec.rb
    * 
Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/rubyspec/language/fixtures/file.rb
    * 
Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/rubyspec/language/fixtures/file/sub.rb
    * 
Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/rubyspec/language/predefined_spec.rb
    * Merlin/Main/Languages/Ruby/Ruby/Builtins/Glob.cs
    * Merlin/Main/Languages/Ruby/Ruby/Hosting/RubyCommandLine.cs
    * Merlin/Main/Languages/Ruby/Ruby/Hosting/RubyOptionsParser.cs
    * Merlin/Main/Languages/Ruby/Ruby/Runtime/RubyUtils.cs

From: Jim Deville
Sent: Monday, April 20, 2009 6:53 PM
To: Jimmy Schementi; ironruby-core@rubyforge.org
Cc: IronRuby External Code Reviewers
Subject: RE: Code Review: __FILE__ and $PROGRAM_NAME paths

Comment left on Github:

Can you move the fixtures up a level and combine them? (Put them in 
rubyspec/fixtures instead of rubyspec/command_line/fixtures and 
rubyspec/language/fixtures)

Also, shouldn't we move Glob.CanonicalizePath to a more central location, then 
use that central location for both the hosting and the Glob implementation? 
Seems like this couples the hosting API to Glob, which doesn't seem good.
Other than that it looks good.

JD

From: Jimmy Schementi
Sent: Monday, April 20, 2009 3:37 PM
To: ironruby-core@rubyforge.org
Cc: IronRuby External Code Reviewers
Subject: Code Review: __FILE__ and $PROGRAM_NAME paths

http://github.com/jschementi/ironruby/commit/3ef1b6ac9718d0c55796c2818da797ea8bab7275

Makes __FILE__ and $PROGRAM_NAME (and $0) have canonicalized paths when Ruby is 
hosted from ir.exe. However, __FILE__ is not messed with when including a file 
via require/load. Fixes 
http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=545.
_______________________________________________
Ironruby-core mailing list
Ironruby-core@rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core

Reply via email to