{"title":"Ruby\u3067comparison of Float with NaN failed\u30a8\u30e9\u30fc","url":"https://blog.turai.work/entry/20180829/1535523108","blog_url":"https://blog.turai.work/","image_url":null,"author_name":"thr3a","author_url":"https://blog.hatena.ne.jp/thr3a/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.turai.work%2Fentry%2F20180829%2F1535523108\" title=\"Ruby\u3067comparison of Float with NaN failed\u30a8\u30e9\u30fc - \u52d5\u304b\u3056\u308b\u3053\u3068\u30d0\u30b0\u306e\u5982\u3057\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","categories":["ruby"],"description":"ruby\u3067\u306a\u3093\u304b\u30d0\u30c3\u30c1\u56de\u3057\u3066\u305f\u3089\u3001\u666e\u6bb5\u898b\u306a\u3044\u30a8\u30e9\u30fc\u306b\u906d\u9047\u3057\u305f rake aborted! ArgumentError: comparison of Float with -6.94 failed \u30a6\u30c1\u306a\u3093\u3082\u60aa\u3044\u3053\u3068\u3057\u3066\u306a\u3044\u306e\u306b\u3068\u304b\u601d\u3063\u3066\u305f\u3051\u3069\u3001\u3084\u3063\u3071\u308a\u60aa\u304b\u3063\u305f \u539f\u56e0 NaN\u306e\u305b\u3044 \u5f53\u7136\u3060\u304c\u3001ruby\u3067\u306f\uff10\u3067\u5272\u308d\u3046\u3068\u3059\u308b\u3068\u4f8b\u5916\u304c\u767a\u751f\u3059\u308b irb(main):005:0> 0/0 ZeroDivisionError: divided by 0 \u304c\u3001float\u306b\u5909\u63db\u3057\u3066\u5272\u308b\u3068\u4f8b\u5916\u306f\u767a\u751f\u3057\u306a\u3044 \u305d\u3057\u3066NaN\u304c\u8fd4\u3063\u3066\u304f\u308b [4] pry(main)> 0/0.to_f => NaN \u3067\u3001\u672c\u6765\u5c0f\u6570\u70b9\u304c\u5165\u308b\u2026","provider_url":"https://hatena.blog","version":"1.0","blog_title":"\u52d5\u304b\u3056\u308b\u3053\u3068\u30d0\u30b0\u306e\u5982\u3057","provider_name":"Hatena Blog","height":"190","width":"100%","published":"2018-08-29 15:11:48","type":"rich"}