# Problem with cgi

**URL:** <https://www.ruby-forum.com/t/problem-with-cgi/137226>\
**Category:** Ruby\
**Created:** [May 10, 2008, 11:17am UTC](https://www.ruby-forum.com/t/problem-with-cgi/137226 "2008-05-10T11:17:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Une\_BSSSSvS\_ue](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/2acd7d/32.png) [@Une\_BSSSSvS\_ue](https://www.ruby-forum.com/u/Une_BSSSSvS_ue)\
**Post date:** [May 10, 2008, 11:17am UTC](https://www.ruby-forum.com/t/problem-with-cgi/137226/1 "2008-05-10T11:17:29Z")

</div>

i’m using cgi under mod\_ruby with Apache2.

i’ve found something strange, to me :  
my code extends the Array class :  
class Array  
def include\_page?(a)  
self.each {|p| return true if p===(a)}  
return false  
end  
end

the method ===() being defined in the class Page :  
class Page

include ManPage

attr\_accessor :manpath,:section,:page,:count,:key

def initialize(manpath,section,page)  
[…]  
def ===(a)  
return false unless a.class == Page  
return  
self.manpath===a.manpath&&self.section===a.section&&self.page===a.page  
end  
[…]  
end

if i test those methods (include\_page?(a) and ===(a)) apart from cgi and  
mod\_ruby, everything is OK;

however, under mod\_ruby and cgi, include\_page?(a) returns always false.

requirements in the first case :  
require ‘manpage’  
include ManPage

requirements in the second case (with cgi and mod\_ruby)  
require ‘man\_rep/manpage’  
require ‘rubygems’  
require ‘cgi’  
require ‘pstore’

include ManPage

does it means cgi does something behind the scene ?
