I hear "Ruby is pure OOP language" and "everything in Ruby is an object." If it is so, why do we have these two situations?
- Functions like
puts
andprint
work on a string object. According to OOP rules, the object's method is the one that should manipulate it's state. - I tried to define functions inside irb, and it accepts it. It's not object oriented to write functions because, if it was object oriented, we cannot define functions this way; we should define them in classes as in C#.
Can anyone explain how these two situations fit with the phrase "Ruby is pure OOP language"?