I\'m trying to create a class, which has a constructor that takes a single argument. When I create a new instance of the object, it returns a pointer.
class Adde
That's because the object is a pointer. In Ruby, all objects are allocated on the heap, and the variables are just references to them.
When you do
puts y
It is actually calling the default to_s method of the object, which is just to output the class name, the memory location, and some info on the instance variables of the object.