From: luk malcik Date: 2012-02-10T00:17:48+09:00 Subject: why doesn't work why method pierw doesn't run? class Wielomian attr_accessor :a, :b, :c def initialize @d end def +(other) result = Wielomian.new result.a = self.a + other.a result.b = self.b + other.b result.c = self.c + other.c result end def -(other) result = Wielomian.new result.a = self.a - other.a result.b = self.b - other.b result.c = self.c - other.c result end def *(other) result = Wielomian.new result.a = self.a * other.a result.b = self.b * other.b result.c = self.c * other.c result end def /(other) result = Wielomian.new result.a = self.a / other.a result.b = self.b / other.b result.c = self.c / other.c result end def delta @d = b**2 - (4*a*c) end def pierw x1 = -(b - (Math.sqrt(@d))/2*a) end end -- Posted via http://www.ruby-forum.com/.