From daadb8bd53c9a0038fe7f51652b72aaa9b93a220 Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 10 Apr 2002 08:47:46 +0000 Subject: * variable.c (rb_obj_remove_instance_variable): raise NameError if specified instance variable is not defined. * variable.c (generic_ivar_remove): modified to check ivar existence. * class.c (rb_singleton_class): wrong condition; was creating unnecessary singleton class. * numeric.c (int_step): step may be a float less than 1. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- numeric.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numeric.c') diff --git a/numeric.c b/numeric.c index d5896fe2d3..36292114f3 100644 --- a/numeric.c +++ b/numeric.c @@ -1411,7 +1411,7 @@ int_step(from, to, step) VALUE i = from; ID cmp; - if (NUM2INT(step) == 0) { + if (rb_equal(step, INT2FIX(0))) { rb_raise(rb_eArgError, "step cannot be 0"); } -- cgit v1.2.3