# Ruby / irb don't match up?

**URL:** <https://www.ruby-forum.com/t/ruby-irb-dont-match-up/78420>\
**Category:** Ruby\
**Created:** [December 5, 2006, 5:57pm UTC](https://www.ruby-forum.com/t/ruby-irb-dont-match-up/78420 "2006-12-05T17:57:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matt\_Maycock](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e9a140/32.png) [@Matt\_Maycock](https://www.ruby-forum.com/u/Matt_Maycock)\
**Post date:** [December 5, 2006, 5:57pm UTC](https://www.ruby-forum.com/t/ruby-irb-dont-match-up/78420/1 "2006-12-05T17:57:59Z")

</div>

Hi,

I have the following versions of ruby / irb (from the rubyforge  
windows installer)

C:\ruby\bin\>ruby -v  
ruby 1.8.4 (2006-04-14) [i386-mswin32]

C:\ruby\bin\>irb -v  
irb 0.9.5(05/04/13)

and I wrote a module (as a C extension) and have the following results  
(Note that Config - a submodule - is missing in the irb results):

# Ruby

C:\ruby\bin\>ruby -r Sleep/BoutsIntervals -e “p  
Sleep::BoutsIntervals.constants”  
[“IPP”, “Death”, “Config”, “DAMS”, “Args”]

# IRB

C:\ruby\bin\>irb -r Sleep/BoutsIntervals  
irb(main):001:0\> Sleep::BoutsIntervals.constants  
=\> [“IPP”, “Death”, “DAMS”, “Args”]

The extension was compiled via the directions in

[http://www.koontzfamily.org/david/blog/?p=230](http://www.koontzfamily.org/david/blog/?p=230)

using cl:  
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for  
80x86  
Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.

Any ideas?

~Matt Maycock

---

<div class="post-metadata">

**Author:** ![Matt\_Maycock](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e9a140/32.png) [@Matt\_Maycock](https://www.ruby-forum.com/u/Matt_Maycock)\
**Post date:** [December 5, 2006, 6:10pm UTC](https://www.ruby-forum.com/t/ruby-irb-dont-match-up/78420/2 "2006-12-05T18:10:03Z")

</div>

I just found this, which might shed light on the situation (the  
difference here is that I am first requiring via the -r argument, then  
using a require).

C:\DOCUME~1\ummaycoc\Desktop\src\interface\bouts\_intervals\ruby\>ruby -r  
Sleep/Bo  
utsIntervals -e “p Sleep::BoutsIntervals.constants”  
[“IPP”, “Death”, “Config”, “DAMS”, “Args”]

C:\DOCUME~1\ummaycoc\Desktop\src\interface\bouts\_intervals\ruby\>ruby -e  
“require  
‘Sleep/BoutsIntervals’; p Sleep::BoutsIntervals.constants”  
[“Args”, “IPP”, “Death”, “DAMS”]

However, irb -r and irb … require both ignore the Config module.

~Matthew Maycock
