On 04/28/2011 02:48 AM, amir e. wrote:
> Hi
> 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.
> 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

Actually, "everything is an object" is probably a mantra Rubyists should 
drop, because people will get confused when they find they can't call 
methods on every piece of Ruby code.

I would say all values in Ruby are objects and all expressions return a 
value. But there are (admittedly few) things which are not expressions.

The best thing is to not worry too much about absolutes and just enjoy 
exploring.

-Justin