ext/games_dice/probabilities.c in games_dice-0.3.6 vs ext/games_dice/probabilities.c in games_dice-0.3.7
- old
+ new
@@ -742,9 +742,11 @@
alloc_probs_iv( pl, s, 1.0/s );
return obj;
}
VALUE probabilities_from_h( VALUE self, VALUE hash ) {
+ Check_Type( hash, T_HASH );
+
VALUE obj = pl_alloc( Probabilities );
ProbabilityList *pl = get_probability_list( obj );
double error;
// Set these up so that they get adjusted during hash iteration