From: gotoken@... (GOTO Kentaro) Date: 2000-03-17T02:34:14+09:00 Subject: [ruby-talk:01914] Re: I'm stumped...! Hi, In message "[ruby-talk:01903] I'm stumped...!" on 00/03/16, "David Douthitt" writes: >#!/opt/ruby/bin/ruby > >#--------------------------------- ># Oracle Specific Functions >#--------------------------------- > >oratab = "/etc/oratab"; This variable `oratab' is a local variable, which doesn't shared by other class scopes, i.e., the below: >class Oratab < ConfigFile > def open > super(oratab) > end Here oratab is not defined. You should use a canstant (Oratab) or a global variable ($oratab). I would recommend to use a constant Oratab::OratabFile, that is, class Oratab < ConfigFile OratabFile = "/etc/oratab" But the error was directly from misplace the definition. If you would use `Oratab.open', you have to define `Oratab.open', so: class Oratab < ConfigFile OratabFile = "/etc/oratab" def Oratab.open super(OratabFile) end > def instances > Oratab.open.each_line { |line| > data = (line =~ /^([^:]+):/) > yield data > } > end >end Hope this helps -- gotoken