Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > in `include': wrong argument type Class ???

Reply
Thread Tools

in `include': wrong argument type Class ???

 
 
Une Bévue
Guest
Posts: n/a
 
      05-09-2008
i did something like :

module ManPage
MANPATH=[<an array of pathes to man>]
MANSEC=[<an array of sections>]
end

class Page
include ManPage

attr_accessor :manpath,:section,age,:count,:key

def initialize(manpath,section,page)
...
end

using that from another script:

require 'man_rep/manpage' #requires the file where are the module
ManPage and the class Page

include ManPage

and the error come in this line (just above) ?

why ? what did i misunderstood ?

the purpose of the "module" is only to get the two arrays MANPATH and
MANSEC common to both the class Page and any script using this class
Page.

i should mention, the script itself is a cgi script working under
mod_ruby (Apache2).
--
Une Bévue
 
Reply With Quote
 
 
 
 
Une Bévue
Guest
Posts: n/a
 
      05-09-2008
Une Bévue <> wrote:

> why ?


it was a caching problem, restarting the server did the trick...
--
Une Bévue
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Class nested inside a template class as template function argument type claudiu C++ 3 04-01-2011 01:02 PM
Class nested inside a template class as template function argument type claudiu C Programming 2 04-01-2011 12:10 PM
invalid operands to binary == or wrong type argument to unary exclamation mark Sheldon C Programming 5 11-06-2007 05:33 PM
libxml Node#find gives 'wrong argument type nil (expected Data)' transfire@gmail.com Ruby 0 07-08-2006 03:47 AM
"wrong argument type nil (expected String)" from Dir.chdir Tim Kynerd Ruby 12 11-28-2003 09:51 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57