What can I do to recognize an array which is declared in a constructor, by method, in this class?
I received an error:
undefined local variable or method 'myArray'
myArray = 
obj1 = Calc.new
You need to declare it as an instance variable as opposed to a local variable. In the constructor, use
@myarray = .