[rspec-users] should RSpec add '.' to $LOAD_PATH for ruby-1.9.2?

John Feminella johnf.pub at distb.net
Wed May 26 10:00:13 EDT 2010

I've updated my tests for 1.9.2, and although initially I thought it
was obnoxious, it's a very sensible change. If `.` is in `$:`, then
your `require` line needs to change depending on where you run rspec
(or any other command invoking your Ruby scripts) from.

What's much more sensible is to replace all usages of `require '...'`
that depend on `.` with a `require_relative` directive instead.

~ jf
John Feminella
Principal Consultant, Distilled Brilliance

On Wed, May 26, 2010 at 09:23, David Chelimsky <dchelimsky at gmail.com> wrote:
> Ruby-1.9.2 removes '.' from the $LOAD_PATH. There have been a couple of issues reported against rspec-core-2 asking RSpec to add '.' to $LOAD_PATH for 1.9.2. My instinct is that this is the wrong way to go; that Ruby is telling us to get used to typing "./" when we run command line tools. What do _you_ think?
> =================
> http://github.com/rspec/rspec-core/issues/issue/28
> http://github.com/rspec/rspec-core/issues/issue/29
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users

More information about the rspec-users mailing list