Bug #1733: require does not look at current directory anymore ?
http://redmine.ruby-lang.org/issues/show/1733

Author: Chauk-Mean Proum
Status: Open, Priority: Normal
Category: core, Target version: 1.9.x
ruby -v: ruby 1.9.2dev (2009-07-03 trunk 23939)

In ruby-1.9 trunk, the behaviour of require has changed.
Require does not look at the current directory anymore.
Is this intentional ?

$ cat a.rb
puts "Hello World"

$ cat b.rb
require 'a'
puts "Goodbye World"

$ ruby -v b.rb
ruby 1.9.2dev (2009-07-03 trunk 23939) [i386-mingw32]
b.rb:1:in `require': no such file to load -- a (LoadError)
        from b.rb:1:in `<main>'

Replacing require 'a' with require './a' or require_relative 'a' works.
But this introduces incompatibility issues with code that works with ruby-1.8 and ruby-1.9.1-p129.


----------------------------------------
http://redmine.ruby-lang.org