From: harryo@... (Harry Ohlsen) Date: 2001-02-23T21:10:04+09:00 Subject: [ruby-talk:11373] Re: Using an object as a variable On Fri, 23 Feb 2001 16:29:17 +0900, Stephen White wrote: >I can use strings and numbers as simple variables, eg: > > a = 45 > b = 54 > c = a + b > puts c I guess what you're looking for is the equivalent of C++'s constructors, where "a = " causes a call to the constructor for whatever type "a" is that takes a parameter of the type of . Unfortunately, I can't see any nice way one could fit this into Ruby, since there's no type information for "a". As ts says, you can get what you're after for the "a + b" part, because by the time that is called, a and b have been created and are of some type.