{"title":"freeze \u30e1\u30bd\u30c3\u30c9","type":"rich","author_name":"YokoKen","provider_name":"Hatena Blog","width":"100%","blog_url":"https://yokoken.hatenadiary.org/","author_url":"https://blog.hatena.ne.jp/YokoKen/","published":"2009-02-11 22:35:07","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fyokoken.hatenadiary.org%2Fentry%2F20090211%2F1234359307\" title=\"freeze \u30e1\u30bd\u30c3\u30c9 - \u6c17\u697d\u306b\u8af8\u3005\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","description":"\u307b\u3078\u301c\u3001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5909\u6570\u306e\u5909\u66f4\u3092\u7981\u6b62\u3067\u304d\u308b\u3068\u306f class Hoge def initialize @var = \"\" end attr_accessor :var end h = Hoge.new() h.var = \"abc\" h.freeze() begin h.var = \"aiueo\" rescue TypeError => err puts err.message #=> can't modify frozen object end","image_url":null,"height":"190","url":"https://yokoken.hatenadiary.org/entry/20090211/1234359307","categories":["Ruby"],"provider_url":"https://hatena.blog","blog_title":"\u6c17\u697d\u306b\u8af8\u3005","version":"1.0"}