{"url":"https://hisaichi5518.hatenablog.jp/entry/2014/10/14/113845","categories":[],"provider_url":"https://hatena.blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhisaichi5518.hatenablog.jp%2Fentry%2F2014%2F10%2F14%2F113845\" title=\"\u30e1\u30bd\u30c3\u30c9\u3092\u629c\u3051\u305f\u3089\u3042\u308b\u51e6\u7406\u3092\u5b9f\u884c\u3059\u308b\u3001\u3092Ruby\u3067\u3084\u3063\u3066\u307f\u308b - \u30d1\u30eb\u30ab\u30ef2\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","blog_title":"\u30d1\u30eb\u30ab\u30ef2","type":"rich","published":"2014-10-14 11:38:45","author_url":"https://blog.hatena.ne.jp/hisaichi5518/","image_url":null,"height":"190","description":"\u30d1\u30fc\u30d5\u30a7\u30af\u30c8Ruby\u898b\u3066\u305f\u3089\u3001\u51fa\u6765\u305d\u3046\u3060\u306a\u30fc\u3068\u601d\u3063\u305f\u306e\u3067\u3084\u3063\u3066\u307f\u307e\u3057\u305f\u3002 \u672c\u5f53\u306f\u30ac\u30fc\u30c9\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u4f5c\u308a\u305f\u3044\u3002 def hoge trace = TracePoint.new(:return, :raise) do |tp| next if tp.method_id != :hoge # io.close\u306a\u3069\u3001\u3053\u3053\u306bhoge()\u304c\u7d42\u308f\u3063\u305f\u3089\u5b9f\u884c\u3057\u305f\u3044\u51e6\u7406\u3092\u66f8\u304f trace.disable end trace.enable # \u306a\u3093\u304b\u305d\u308c\u3063\u307d\u3044\u51e6\u7406 end hoge() TracePoint\u9762\u767d\u3044\u3002 http://docs.ruby-lang.org/ja/2.1.0/class/TracePoi\u2026","title":"\u30e1\u30bd\u30c3\u30c9\u3092\u629c\u3051\u305f\u3089\u3042\u308b\u51e6\u7406\u3092\u5b9f\u884c\u3059\u308b\u3001\u3092Ruby\u3067\u3084\u3063\u3066\u307f\u308b","author_name":"hisaichi5518","width":"100%","blog_url":"https://hisaichi5518.hatenablog.jp/","provider_name":"Hatena Blog","version":"1.0"}