Help with require in 1.9.2 p0

M

Michel Demazure

I have this strange bug with a chain of requires, after a certain number
of hops. It is independant of the file to require. Even in the following
case with the same file twice

<processor.rb>
6 require 'slot.rb'
7 puts "yes"
8 require 'slot.rb'

the first require works, "yes" is printed, and the second require to the
*same* file bugs :

<internal:lib/rubygems/custom_require>:29:in `require': can't convert
nil into String (TypeError)
yes
from <internal:lib/rubygems/custom_require>:29:in `require'
from F:/dev/ruby/Capucine/lib/processor.rb:8:in `<top
(required)>'
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from F:/dev/ruby/Capucine/lib/manager.rb:6:in `<top (required)>'
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from F:/dev/ruby/Capucine/lib/main.rb:10:in `<main>'

This bug appears also with another chain (using rspec), this time
refusing files which are correctly loaded in the previous case.

Maybe this is for ruby-core, but I have no access to it.

_md
 
M

Michel Demazure

Michel Demazure wrote in post #949797:
I have this strange bug with a chain of requires, after a certain number
of hops. It is independant of the file to require.

Actually, it is due to some method_missing hack in a previously loaded
file, which worked under 1.9.1, and no more in 1.9.2.

My bad !

_md
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top