{"version":"1.0","title":" Ruby\u306e\u4f8b\u5916\u30af\u30e9\u30b9\u8a2d\u8a08","blog_url":"https://kwatch.hatenadiary.org/","author_url":"https://blog.hatena.ne.jp/kwatch/","categories":["ruby"],"provider_url":"https://hatena.blog","blog_title":"k\u306a\u3093\u3068\u304b\u306e\u65e5\u8a18","published":"2009-06-28 14:36:38","provider_name":"Hatena Blog","image_url":null,"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkwatch.hatenadiary.org%2Fentry%2F20090628%2F1246167398\" title=\" Ruby\u306e\u4f8b\u5916\u30af\u30e9\u30b9\u8a2d\u8a08 - k\u306a\u3093\u3068\u304b\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>","width":"100%","type":"rich","url":"https://kwatch.hatenadiary.org/entry/20090628/1246167398","author_name":"kwatch","description":"\u5177\u4f53\u7684\u306b\u306f\u3001\u30c6\u30b9\u30c8\u3067\u3059 *2 \u3002\u4f8b\u3048\u3070 foo(1, 2) \u3067 wrong number of arguments \u304c\u6295\u3052\u3089\u308c\u308b\u3053\u3068\u3092\u30c6\u30b9\u30c8\u3057\u305f\u3044\u3068\u3057\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u30c6\u30b9\u30c8\u3060\u3068\u3001wrong number of arguments \u4ee5\u5916\u306e ArgumentError \u304c\u6295\u3052\u3089\u308c\u308b\u5834\u5408\u3067\u3082\u5408\u683c\u306b\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u3002 assert_raise(ArgumentError) { foo(1, 2) }\u3061\u3083\u3093\u3068\u3084\u308a\u305f\u3051\u308c\u3070\u3001\u4f8b\u3048\u3070\u3053\u3093\u306a\u611f\u3058\u306e\u30b3\u30fc\u30c9\u3092\u66f8\u304b\u306a\u3044\u3068\u3060\u3081\u304b\u306a\u3002 flag = false begin foo(1, 2) rescue ArgumentError => e raise unless ex\u2026","height":"190"}