[#1816] Ruby 1.5.3 under Tru64 (Alpha)? — Clemens Hintze <clemens.hintze@...>

Hi all,

17 messages 2000/03/14

[#1989] English Ruby/Gtk Tutorial? — schneik@...

18 messages 2000/03/17

[#2241] setter() for local variables — ts <decoux@...>

18 messages 2000/03/29

[ruby-talk:01915] Re: I'm stumped...!

From: "David Douthitt" <DDouthitt@...>
Date: 2000-03-16 17:41:00 UTC
List: ruby-talk #1915
Dave Thomas wrote:

| You're calling 'open' as a class method (or what the documentation
| calls a singleton method), but you defined it as an instance method.
| 
| You could change the definition to
| 
|   class OraTab
|      def OraTab.open
|        super(oratab)
|      end

Ahhhh.... the light is starting to dawn!  :-)

The note about "....or what the documentation calls a singleton method"
helps.  Yet, why does the following snippet from the code WORK when
the others fail?

ConfigFile.open(oratab).each_line { |line|
   line.chomp!;
   print line, "\n";
   }


In This Thread

Prev Next