From: Tanaka Akira Date: 2003-11-26T08:29:37+09:00 Subject: Re: Library path relative to current .rb file In article <200311252313.21059.andrew@walrond.org>, Andrew Walrond writes: > Actually, this appears to be broken when I try to use it. Example: > > root@bob root # ls -l /sbin/rubyx > lrwxrwxrwx 1 root root 23 Nov 24 20:41 /sbin/rubyx -> /pkg/rubyx.1/sbin/rubyx > root@bob root # irb > irb(main):001:0> require 'pathname' > => true > irb(main):002:0> Pathname.new('/sbin/rubyx') > => # > irb(main):003:0> Pathname.new('/sbin/rubyx').realpath > Errno::ENOENT: No such file or directory - /sbin/pkg > from /pkg/ruby.1/lib/ruby/1.8/pathname.rb:144:in `lstat' > from /pkg/ruby.1/lib/ruby/1.8/pathname.rb:144:in `realpath_rec' > from /pkg/ruby.1/lib/ruby/1.8/pathname.rb:125:in `scan' > from /pkg/ruby.1/lib/ruby/1.8/pathname.rb:125:in `realpath_rec' > from /pkg/ruby.1/lib/ruby/1.8/pathname.rb:149:in `realpath_rec' > from /pkg/ruby.1/lib/ruby/1.8/pathname.rb:125:in `scan' > from /pkg/ruby.1/lib/ruby/1.8/pathname.rb:125:in `realpath_rec' > from /pkg/ruby.1/lib/ruby/1.8/pathname.rb:113:in `realpath' > from (irb):3 > from :0 > irb(main):004:0> It is already fixed in latest CVS version. -- Tanaka Akira