[SVN] Revision 1188 (Ruby)
Sune Foldager
cryo at cyanite.org
Tue Jun 14 11:00:46 UTC 2005
On 14/06/2005, at 11.43, Michael Sheets wrote:
> Added a module declaration scope. Fixed the use of "class <<self"
> to no longer start a heredoc as well as be properly scoped.
Actually, it's "class << [variable]", where [variable] denotes any
object, that is to be extended.
Example:
foo = [1, 2, 3]
class << foo
def test
puts "Yo!"
end
end
foo
> [1, 2, 3]
foo.test
Yo!
> Yo!
-- Sune.
More information about the textmate-dev
mailing list