Issue #4979 has been updated by Antonio Terceiro.


What is needed to have a decision?
----------------------------------------
Feature #4979: `require 'foo'` is ambiguous when there is both foo.rb and foo.so
http://redmine.ruby-lang.org/issues/4979

Author: Antonio Terceiro
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 


=begin

When there is both foo.rb and foo.so and a `require 'foo'` call is evaluated, Ruby 1.8 will load either foo.rb or foo.so depending on which order their directories are in $LOAD_PATH.

Ruby 1.8 will load the first foo.rb or foo.so it finds in the $LOAD_PATH.

Ruby 1.9 will first look for foo.rb in all directories, and only after that it will look for foo.so in all directories. This behaviour seems more consistent than the one in Ruby 1.8. It also matches the most common use case, which is foo.rb loading its sister foo.so that contains native-code implementations needed by foo.rb.

I have attached a test case that shows these different behaviours of Ruby 1.8 and Ruby 1.9.

I propose to make Ruby 1.8 work the same way as Ruby 1.9. If there is consensus about that, I can try to write a patch to backport the behaviour of Ruby 1.9 for Ruby 1.8.

=end



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