{"width":"100%","author_url":"https://blog.hatena.ne.jp/rubyco/","type":"rich","provider_name":"Hatena Blog","height":"190","version":"1.0","author_name":"rubyco","title":"\u7279\u7570\u30e1\u30bd\u30c3\u30c9","url":"https://rubyco.hatenadiary.org/entry/20060307/singletonmethod","provider_url":"https://hatena.blog","blog_url":"https://rubyco.hatenadiary.org/","categories":[],"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Frubyco.hatenadiary.org%2Fentry%2F20060307%2Fsingletonmethod\" title=\"\u7279\u7570\u30e1\u30bd\u30c3\u30c9 - rubyco\uff08\u308b\u3073\u3053\uff09\u306e\u65e5\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","image_url":null,"description":"\u6570\u306b\u5bfe\u3057\u3066\u7279\u7570\u30e1\u30bd\u30c3\u30c9\u3092\u5b9a\u7fa9\u3057\u3088\u3046\u3068\u3059\u308b\u3068\u69cb\u6587\u89e3\u6790\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3057\u305f\u3002 def 1.hello puts \"Hello\" end #=> parse error, unexpected tINTEGER\u69cb\u6587\u89e3\u6790\u30a8\u30e9\u30fc\u3092\u56de\u907f\u3059\u308b\u305f\u3081\u30ab\u30c3\u30b3\u3092\u3064\u3051\u305f\u3089\u3001\u30ea\u30c6\u30e9\u30eb\u306b\u7279\u7570\u30e1\u30bd\u30c3\u30c9\u306f\u5b9a\u7fa9\u3067\u304d\u306a\u3044\u3068\u8a00\u308f\u308c\u307e\u3057\u305f\u3002 def (1).hello puts \"Hello\" end #=> can't define singleton method for literals\u3044\u3063\u305f\u3093\u5909\u6570\u306b\u5165\u308c\u3066\u304b\u3089\u5b9a\u7fa9\u3057\u305f\u3089\u3001Fixnum\u306b\u7279\u7570\u30e1\u30bd\u30c3\u30c9\u306f\u5b9a\u7fa9\u3067\u304d\u306a\u3044\u3068\u8a00\u308f\u308c\u307e\u3057\u305f\u3002 s = 1 def s.hello puts \"H\u2026","blog_title":"rubyco\uff08\u308b\u3073\u3053\uff09\u306e\u65e5\u8a18","published":"2006-03-07 00:00:04"}