From: "Ara.T.Howard" Date: 2004-02-12T10:24:58+09:00 Subject: Re: ruby-dev summary: 22688-22826 On Thu, 12 Feb 2004, Yukihiro Matsumoto wrote: > Date: Thu, 12 Feb 2004 08:36:03 +0900 > From: Yukihiro Matsumoto > Newsgroups: comp.lang.ruby > Subject: Re: ruby-dev summary: 22688-22826 > > Hi, > > In message "Re: ruby-dev summary: 22688-22826" > on 04/02/12, Paul Brannan writes: > > |> Matz disagree to make the require method load libraries > |> with relative path, but he allowed other method to do it. > |> Some details are not determined yet: > |> > |> * name > |> * handling of symbolic link > |> > |> In addition, Tanaka made an advice to record the full path > |> in $:. Matz agreed and promised to implement it when > |> he has a time to do. > | > |For the record, I really like both of these ideas; they would completely > |eliminate the use I have for requirelocal/loadlocal in RubyTreasures. > > Any name suggestion? * link as in ld. i say this because it would be used primarily with packages/libraires trying to 'link' to dependancies... the sematics of link would be - first try relative - then try $: a notion of version could be added if that could ever be agreed upon, eg link 'foobar-1.0.0' mighit load foobar-2.1.1 if it were available (using libtool style versioning => interface.age.impl) * relative a keyword/method to transform a path into a relative one def this path require 'pathname' File.join(Pathname.new(File.dirname(File.expand_path(__FILE__))).realpath, path) end require relative 'sub-package' * include effectively 'require relative' -a -- ATTN: please update your address books with address below! =============================================================================== | EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov | PHONE :: 303.497.6469 | ADDRESS :: E/GC2 325 Broadway, Boulder, CO 80305-3328 | STP :: http://www.ngdc.noaa.gov/stp/ | NGDC :: http://www.ngdc.noaa.gov/ | NESDIS :: http://www.nesdis.noaa.gov/ | NOAA :: http://www.noaa.gov/ | US DOC :: http://www.commerce.gov/ | | The difference between art and science is that science is what we | understand well enough to explain to a computer. | Art is everything else. | -- Donald Knuth, "Discover" | | /bin/sh -c 'for l in ruby perl;do $l -e "print \"\x3a\x2d\x29\x0a\"";done' ===============================================================================