[MacRuby-devel] [MacRuby] #163: macruby_main forces a relative path
MacRuby
ruby-noreply at macosforge.org
Sun Nov 16 10:30:41 PST 2008
#163: macruby_main forces a relative path
----------------------------------+-----------------------------------------
Reporter: jjoonathan at gmail.com | Owner: lsansonetti at apple.com
Type: enhancement | Status: new
Priority: minor | Milestone: MacRuby 0.4
Component: MacRuby | Keywords:
----------------------------------+-----------------------------------------
Sometimes it makes sense to load a script from a path external to the main
bundle (say, inside an input manager or something), but macruby_main
automatically prepends the main bundle's resource path, making the use of
absolute paths (via ../../ etc) extremely hackish.
My proposed solution is also hackish, but it works. Simply check to see if
the path starts with a "/" and don't prepend the resource folder path if
that's the case.
'''objc.m:2819'''
s/&p1[2]/(path[0] != '/') ? &p1[2] : ""
--
Ticket URL: <http://www.macruby.org/trac/ticket/163>
MacRuby <http://macruby.org/>
More information about the MacRuby-devel
mailing list