|
|
|
|
|
by mattjones
6682 days ago
|
|
To some degree, using open classes is just how you write functions in Ruby. Say there exists a class called Errors in some Ruby library. It doesn't have an each() method, but I'd like it to. Nobody would complain if I wrote a function each_error() which took an Errors object as an argument. Reopening the Errors class and giving it an each() method is the way you do that in Ruby, and it's not really any more dangerous. |
|