[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Newbie - error while trying subclass

David A. Black

12/14/2008 7:21:00 PM

Hi --

On Mon, 15 Dec 2008, Rubystudent wrote:

> I am trying to subclass in my code (see below). But I am getting the
> following error while running the code.
>
> song.rb:12: class/module name must be CONSTANT
> class karaokeSong < Song
> ^

karaokeSong isn't a constant. Try KaraokeSong (uppercase 'K').


David

--
David A. Black / Ruby Power and Light, LLC
Ruby/Rails consulting & training: http://www.r...
Coming in 2009: The Well-Grounded Rubyist (http://manning....)