# Help with require in 1.9.2 p0

**URL:** <https://www.ruby-forum.com/t/help-with-require-in-1-9-2-p0/197367>\
**Category:** Ruby\
**Created:** [October 13, 2010, 12:24pm UTC](https://www.ruby-forum.com/t/help-with-require-in-1-9-2-p0/197367 "2010-10-13T12:24:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![okkezSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/85f322/32.png) [@okkezSS](https://www.ruby-forum.com/u/okkezSS)\
**Post date:** [October 13, 2010, 12:24pm UTC](https://www.ruby-forum.com/t/help-with-require-in-1-9-2-p0/197367/1 "2010-10-13T12:24:57Z")

</div>

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 `’

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

---

<div class="post-metadata">

**Author:** ![micheldogger](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b5e925/32.png) [@micheldogger](https://www.ruby-forum.com/u/micheldogger)\
**Post date:** [October 13, 2010, 2:25pm UTC](https://www.ruby-forum.com/t/help-with-require-in-1-9-2-p0/197367/2 "2010-10-13T14:25:39Z")

</div>

Michel D. 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
