Selector Namespace You can add methods to existing class globally now. But global changes are evil. Selector namespace is a feature to encapsulate changes in certain scope. $a = "4" namespace foo # syntax may change class String def to_i 0 end end p $a.to_i # => 0, in this namespace end # of namespace p $a.to_i # => 4