From: Robert Klemme Date: 2011-04-28T18:59:03+09:00 Subject: Re: Is everything object ? On Thu, Apr 28, 2011 at 11:48 AM, amir e. wrote: > A very important principle in Ruby is that every thing is object. > I read somewhere that there is no primitive operation in Ruby in > traditional form and every operation is class. That wording does not really make sense. You probably mean that every operator is a method, do you? > Now if every thing is object , then why   + , - , * , ^ , ^^   isn't > class Although they are primitive operation ? > > ps : If you test these codes , error happen : +.class  -.class   *.class I am not 100% sure what you are up to but in case you wonder whether "+" is not something tangible (i.e. an object) this might explain: operators (+, - etc.) are mainly syntactic sugar for method calls and you can actually invoke them like methods: irb(main):001:0> 1 + 2 => 3 irb(main):002:0> 1.+(2) => 3 irb(main):003:0> 1.send("+", 2) => 3 irb(main):004:0> 1.send(:+, 2) => 3 irb(main):005:0> 1.method "+" => # Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/