From: Todd Corenson Date: 2008-08-24T08:47:37+09:00 Subject: Re: Class_eval vs. reopening class Todd Corenson wrote: > I asked a similar question to this in the Rails forum, but it's pretty > generic to Ruby: > > Is the only difference between these the scoping or is there something > more? > > ActionController::Base.class_eval do > include ActionController::Flash > include ActionController::Filters > ... > end > > class ActionController::Base > include ActionController::Flash > include ActionController::Filters > ... > end The only other difference I can find is that if the class doesn't previouly exist, class_eval on the class will cause an error. -- Posted via http://www.ruby-forum.com/.