Hi,

That's generally true. You can reopen a class at any time (even the 
built-in ones) or modify it through metaprogramming.

However, you can freeze a class to prevent modifications:

class A
  def f
    puts 1
  end
end

# reopen class
class A
  def g
    puts 2
  end
end

# freeze class
A.freeze

# raises an error
class A
  def g
    puts 2
  end
end

-- 
Posted via http://www.ruby-forum.com/.