ext/games_dice/probabilities.c in games_dice-0.3.0 vs ext/games_dice/probabilities.c in games_dice-0.3.1

- old
+ new

@@ -3,10 +3,11 @@ #include "probabilities.h" // Ruby 1.8.7 compatibility patch #ifndef DBL2NUM #define DBL2NUM( dbl_val ) rb_float_new( dbl_val ) +enum st_retval {ST_CONTINUE, ST_STOP, ST_DELETE, ST_CHECK}; #endif VALUE Probabilities = Qnil; /////////////////////////////////////////////////////////////////////////////////////////////////// @@ -690,11 +691,9 @@ alloc_probs_iv( pl, s, 1.0/s ); return obj; } VALUE probabilities_from_h( VALUE self, VALUE hash ) { - rb_check_hash_type( hash ); - VALUE obj = pl_alloc( Probabilities ); ProbabilityList *pl = get_probability_list( obj ); // Set these up so that they get adjusted during hash iteration pl->offset = 2000000000; pl->slots = 0;