Skip to content

Instantly share code, notes, and snippets.

View phluid61's full-sized avatar
😶
¯\_(ツ)_/¯

Matthew Kerwin phluid61

😶
¯\_(ツ)_/¯
View GitHub Profile
@phluid61
phluid61 / float_range.patch
Last active December 27, 2015 13:19
float ranges
diff --git a/range.c b/range.c
index ebd0811..8cb4da8 100644
--- a/range.c
+++ b/range.c
@@ -419,11 +419,21 @@ range_step(int argc, VALUE *argv, VALUE range)
if (!rb_obj_is_kind_of(step, rb_cNumeric)) {
step = rb_to_int(step);
}
- if (rb_funcall(step, '<', 1, INT2FIX(0))) {
- rb_raise(rb_eArgError, "step can't be negative");