From: Yukihiro Matsumoto Date: 2009-06-18T01:23:36+09:00 Subject: Re: private method - Fixnum (NoMethodError) Hi, In message "Re: private method - Fixnum (NoMethodError)" on Thu, 18 Jun 2009 01:13:56 +0900, salai writes: |I can't find the error in my code. Can you explain me "private method |- Fixnum (NoMethodError)"? The actual error message is: s.rb:8: private method `subtotal' called for 11:Fixnum (NoMethodError) and it means visibility of a method defined at the top level is private. If you want to call subtotal in method form, you have to do either * declare subtotal as public explicitly, using public :subtotal * or, re-open Fixnum and define subtotal in class definition matz.