Has this been fixed in more recent releases? I have 2002-10-30.
$ export RUBYLIB=""
It’s ok in 1.6.7:
$ ruby-1.6.7 -r ftools -e ‘p $:’
["", “/usr/local/lib/ruby/site_ruby/1.6”,
"/usr/local/lib/ruby/site_ruby/1.6/i686-linux",
"/usr/local/lib/ruby/site_ruby", “/usr/local/lib/ruby/1.6”,
"/usr/local/lib/ruby/1.6/i686-linux", “.”]
But in 1.7.3…
$ ruby -r ftools -e 'p $:'
ruby: No such file to load – ftools (LoadError)
$ ruby -e ‘p $:’
["", “/usr/local/lib/ruby/site_ruby/1.7”,
"/usr/local/lib/ruby/site_ruby/1.7/i686-linux",
"/usr/local/lib/ruby/site_ruby", “/usr/local/lib/ruby/1.7”,
"/usr/local/lib/ruby/1.7/i686-linux", “.”]
Yukihiro Matsumoto wrote:
Hi,
Has this been fixed in more recent releases? I have 2002-10-30.
First, check where ftools for 1.7 is installed.
matz.
It’s where it should be:
/usr/local/lib/ruby/1.6/ftools.rb
/usr/local/lib/ruby/1.7/ftools.rb
If my $RUBYLIB is not the empty string, there is no problem.
$ export RUBYLIB=“.”
$ ruby -r ftools -e ‘p $:’
[“.”, “/usr/local/lib/ruby/site_ruby/1.7”,
“/usr/local/lib/ruby/site_ruby/1.7/i686-linux”,
“/usr/local/lib/ruby/site_ruby”, “/usr/local/lib/ruby/1.7”,
“/usr/local/lib/ruby/1.7/i686-linux”, “.”]
This is not a problem for me, since I can just ‘unset RUBYLIB’, but it’s
a bit surprising.
···
In message “RUBYLIB=”" causes load problems in 1.7.3" > on 02/11/20, Joel VanderWerf vjoel@PATH.Berkeley.EDU writes:
Joel VanderWerf vjoel@PATH.Berkeley.EDU writes:
First, check where ftools for 1.7 is installed.
matz.
It’s where it should be:
/usr/local/lib/ruby/1.6/ftools.rb
/usr/local/lib/ruby/1.7/ftools.rb
If my $RUBYLIB is not the empty string, there is no problem.
$ export RUBYLIB=“.”
$ ruby -r ftools -e ‘p $:’
[“.”, “/usr/local/lib/ruby/site_ruby/1.7”,
“/usr/local/lib/ruby/site_ruby/1.7/i686-linux”,
“/usr/local/lib/ruby/site_ruby”, “/usr/local/lib/ruby/1.7”,
“/usr/local/lib/ruby/1.7/i686-linux”, “.”]
This is not a problem for me, since I can just ‘unset RUBYLIB’, but it’s
a bit surprising.
Here is a patch for Ruby 1.7:
Index: file.c
···
===================================================================
RCS file: /src/ruby/file.c,v
retrieving revision 1.114
diff -u -1 -p -r1.114 file.c
— file.c 29 Oct 2002 21:35:27 -0000 1.114
+++ file.c 21 Nov 2002 08:19:16 -0000
@@ -2478,3 +2478,3 @@ rb_find_file_ext(filep, ext)
SafeStringValue(str);
- if (RSTRING(str)->len == 0) return 0;
- if (RSTRING(str)->len == 0) continue;
path = RSTRING(str)->ptr;
–
eban
Hi,
In message “Re: RUBYLIB=”" causes load problems in 1.7.3"
It’s where it should be:
/usr/local/lib/ruby/1.6/ftools.rb
/usr/local/lib/ruby/1.7/ftools.rb
If my $RUBYLIB is not the empty string, there is no problem.
$ export RUBYLIB=“.”
$ ruby -r ftools -e ‘p $:’
[“.”, “/usr/local/lib/ruby/site_ruby/1.7”,
“/usr/local/lib/ruby/site_ruby/1.7/i686-linux”,
“/usr/local/lib/ruby/site_ruby”, “/usr/local/lib/ruby/1.7”,
“/usr/local/lib/ruby/1.7/i686-linux”, “.”]
This is not a problem for me, since I can just ‘unset RUBYLIB’, but it’s
a bit surprising.
It was a bug.
— file.c 29 Oct 2002 21:35:27 -0000 1.114
+++ file.c 21 Nov 2002 08:41:51 -0000
@@ -2478,3 +2479,3 @@
SafeStringValue(str);
- if (RSTRING(str)->len == 0) return 0;
- if (RSTRING(str)->len == 0) continue;
path = RSTRING(str)->ptr;