mrubyを超漢字で動作させる
Revisão | c16bb3fee3ba0dfcd74b82fd2167c3fdd0593ba9 (tree) |
---|---|
Hora | 2014-07-04 21:52:51 |
Autor | Yukihiro "Matz" Matsumoto <matz@ruby...> |
Commiter | Yukihiro "Matz" Matsumoto |
Merge pull request #2446 from take-cheeze/fix_mrb_flo_to_fixnum
Fix type checking in mrb_flo_to_fixnum.
@@ -1085,7 +1085,7 @@ mrb_flo_to_fixnum(mrb_state *mrb, mrb_value x) | ||
1085 | 1085 | { |
1086 | 1086 | mrb_int z; |
1087 | 1087 | |
1088 | - if (mrb_float_p(x)) { | |
1088 | + if (!mrb_float_p(x)) { | |
1089 | 1089 | mrb_raise(mrb, E_TYPE_ERROR, "non float value"); |
1090 | 1090 | z = 0; /* not reached. just suppress warnings. */ |
1091 | 1091 | } |