From 9b8dc2dafdbe7742750c7c3b456442a35f7c380a Mon Sep 17 00:00:00 2001 From: Karthikeyan A K Date: Tue, 26 Apr 2016 13:00:29 +0530 Subject: [PATCH] bug in class_super.rb fixed --- class_super.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/class_super.rb b/class_super.rb index f47ae81..b23932a 100644 --- a/class_super.rb +++ b/class_super.rb @@ -2,20 +2,20 @@ # class_super.rb class Rectangle - + def set_dimension length, breadth @length, @breadth = length, breadth end - + def area @length * @breadth end - + end class Square < Rectangle - + def set_dimension side_length super side_length, side_length end @@ -23,5 +23,5 @@ def set_dimension side_length end square = Square.new -square.set_dim 7 +square.set_dimension 7 puts "Area: #{square.area}"