[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:40:02 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            
----------------------------------+-----------------------------------------
 Kernel#framework can accept framework names like 'Cocoa', or paths, like
 '/System/Library/Frameworks/Cocoa.framework'. However, it distinguishes
 between the two forms naively, causing trouble when a file or directory in
 the current directory matches the name of any framework.

 For example, try this with MacRuby 0.9:

 {{{
 # Works!
 $ macruby -e 'framework "Cocoa"'

 $ touch Cocoa
 $ macruby -e 'framework "Cocoa"'
 -e:1:in `<main>': framework at path `Cocoa' cannot be located
 (RuntimeError)
 }}}

 This has become a really annoying problem for me because XCode 4 creates
 separate directories for most targets. Thus, when you try to load your
 custom framework, the above failure occurs because Kernel#framework
 assumes it's found the framework and moves on.

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



More information about the macruby-tickets mailing list