{"provider_name":"Hatena Blog","title":"Ruby 1.8.7\u3067\u306e\u65b0\u30e1\u30bd\u30c3\u30c9\u66f4\u65b0\uff08Array#choice\u2192Array#sample\uff09","author_name":"rubikitch","published":"2008-11-07 03:13:18","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Frubikitch.hatenadiary.org%2Fentry%2F20081107%2F1225995198\" title=\"Ruby 1.8.7\u3067\u306e\u65b0\u30e1\u30bd\u30c3\u30c9\u66f4\u65b0\uff08Array#choice\u2192Array#sample\uff09 - http://rubikitch.com/\u306b\u79fb\u8ee2\u3057\u307e\u3057\u305f\" 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://rubikitch.hatenadiary.org/entry/20081107/1225995198","author_url":"https://blog.hatena.ne.jp/rubikitch/","version":"1.0","description":"Ruby 1.8.7\u3067\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u3063\u305fRuby 1.9\u306e\u30e1\u30bd\u30c3\u30c9\u305f\u3061 - http://rubikitch.com/\u306b\u79fb\u8ee2\u3057\u307e\u3057\u305f\u3044\u3064\u306e\u307e\u306b\u304bArray#choice\u306fArray#sample\u306b\u6539\u540d\u3055\u308c\u3066\u3044\u305f\u3002Array#choice\u306f\u4e92\u63db\u6027\u306e\u305f\u30811.8.7\u3067\u306f\u6b8b\u3063\u3066\u3044\u308b\u304c\u3001Ruby 1.9\u3067\u306f\u306a\u304f\u306a\u3063\u3066\u3044\u308b\u3002 require 'rubygems' require 'expectations' Expectations do # Array#sample\u3067\u30e9\u30f3\u30c0\u30e0\u306a\u8981\u7d20\u3092\u5f97\u308b\u3002 expect 4 do srand 10 [1,2,3,4].sample end expect [4,1] do\u2026","provider_url":"https://hatena.blog","height":"190","blog_title":"http://rubikitch.com/\u306b\u79fb\u8ee2\u3057\u307e\u3057\u305f","blog_url":"https://rubikitch.hatenadiary.org/","width":"100%","type":"rich","categories":["ruby","update"],"image_url":null}