[MacRuby] #1198: Kernel#framework method fails when a file in the current directory matches a framework name

MacRuby ruby-noreply at macosforge.org
Tue Mar 15 18:54:35 PDT 2011


#1198: Kernel#framework method fails when a file in the current directory matches
a framework name
----------------------------------+-----------------------------------------
 Reporter:  christian@…           |       Owner:  lsansonetti@…        
     Type:  defect                |      Status:  new                  
 Priority:  major                 |   Milestone:                       
Component:  MacRuby               |    Keywords:  framework            
----------------------------------+-----------------------------------------

Comment(by christian@…):

 The attached patch tightens up the Kernel#framework method by interpreting
 any paths as paths. All the following will now be treated as a path:

 * /Absolute/Path/To/MyKit.framework[[BR]]
 * /Absolute/Path/To/MyKit[[BR]]
 * relative/path/to/MyKit.framework[[BR]]
 * relative/path/to/MyKit[[BR]]
 * MyKit.framework

 Only the following will be resolved against system paths (including
 DLYD_FRAMEWORK_PATH):

 * MyKit

 In other words any string with a file extension, or more than one path
 component will be resolved as a path.

 This patch should only break scripts that expected a path like
 'MyCompany/MyKit' to resolve against system paths or DYLD_FRAMEWORK_PATH.
 I see this as unlikely (and unwanted) but it can be supported by removing
 the '[[path pathComponents] count] > 1' condition out of the if statement.

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/1198#comment:2>
MacRuby <http://macruby.org/>



More information about the macruby-tickets mailing list