Problem using a method in Ruby

Posted by Rafal on Stack Overflow See other posts from Stack Overflow or by Rafal
Published on 2010-05-03T23:17:46Z Indexed on 2010/05/03 23:28 UTC
Read the original article Hit count: 264

Filed under:
|
|

I'm very new to Ruby (and OOP as well) and I don't know why the following thing doesn't work in Ruby

I extended the String class with a new method. Easy enough. Now I want to extend the Fixnum class. A String object appears somewhere in the class, but I can't use the method that I defined earlier. Why? Is this normal?

© Stack Overflow or respective owner

Related posts about ruby

Related posts about oop