[Mac OS X] problem with cgi

U

Une Bévue

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 ?
 

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

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,152
Latest member
LorettaGur
Top