Created
April 23, 2009 11:08
-
-
Save mathie/100456 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mathie@Tullibardine ~ (master) $ irb | |
>> class Foo | |
>> def bar | |
>> "bar" | |
>> end | |
>> end | |
=> nil | |
>> Foo.new.bar | |
=> "bar" | |
>> class Foo | |
>> def baz | |
>> "baz" | |
>> end | |
>> end | |
=> nil | |
>> Foo.new.baz | |
=> "baz" | |
>> Foo.freeze | |
=> Foo | |
>> class Foo | |
>> def cheese | |
>> "cheese" | |
>> end | |
>> end | |
TypeError: can't modify frozen class | |
from (irb):15 | |
>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment