{"published":"2012-10-16 11:03:05","type":"rich","author_name":"yuroyoro","image_url":null,"width":"100%","provider_url":"https://hatena.blog","categories":["ruby"],"blog_url":"https://yuroyoro.hatenablog.com/","provider_name":"Hatena Blog","height":"190","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fyuroyoro.hatenablog.com%2Fentry%2F2012%2F10%2F16%2F110305\" title=\"Ruby\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u5f15\u6570\u3067\u518d\u5e30 - ( \ua4aa\u2313\ua4aa) \u3086\u308b\u3088\u308d\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>","url":"https://yuroyoro.hatenablog.com/entry/2012/10/16/110305","title":"Ruby\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u5f15\u6570\u3067\u518d\u5e30","version":"1.0","author_url":"https://blog.hatena.ne.jp/yuroyoro/","blog_title":"( \ua4aa\u2313\ua4aa) \u3086\u308b\u3088\u308d\u65e5\u8a18","description":"Ruby\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u5f15\u6570\u3067\u306f\u3001\u4ed6\u306e\u5f15\u6570\u306b\u4f9d\u5b58\u3057\u305f\u5f0f\u3092\u66f8\u3051\u308b\u3002\u5730\u5473\u306b\u4fbf\u5229\u3002 [1] pry(main)> def foo(a, b = a * 2) [1] pry(main)* puts b [1] pry(main)* end => nil [2] pry(main)> foo(3) 6 => nil \u518d\u5e30\u3082\u304b\u3051\u308b\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u5f15\u6570\u3067\u518d\u5e30\u3055\u305b\u3066\u30d5\u30a3\u30dc\u30ca\u3063\u3066\u307f\u308b [3] pry(main)> def fib(n,r = (n <=1 ? n : fib(n-2) + fib(n-1))) [3] pry(main)* r [3] pry(main)* end => nil [4] pry(mai\u2026"}