summaryrefslogtreecommitdiffstats
path: root/numeric.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-04-10 08:45:26 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-04-10 08:45:26 +0000
commit6d3df63952c4fa64d1dfcf32b6c97029659ae7f1 (patch)
tree88516eac5daf33e2e935c3d38415e13d542ac131 /numeric.c
parent94d3be39f050bfc306e56727a8905fa1f69a306a (diff)
downloadruby-6d3df63952c4fa64d1dfcf32b6c97029659ae7f1.tar.gz
ruby-6d3df63952c4fa64d1dfcf32b6c97029659ae7f1.tar.xz
ruby-6d3df63952c4fa64d1dfcf32b6c97029659ae7f1.zip
* 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. * file.c (rb_file_s_extname): new method based on the proposal (and patch) from Mike Hall. [new] * eval.c (error_handle): default to 1 unless status is set. * eval.c (ruby_options): guard error_handle() with PROT_NONE. * eval.c (ruby_stop): ditto. * math.c (math_acosh): added. [new] * math.c (math_asinh): ditto. * math.c (math_atanh): ditto. * struct.c (rb_struct_each_pair): method added. [new] * class.c (rb_singleton_class): wrong condition; was creating unnecessary singleton class. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/numeric.c b/numeric.c
index 39703fae3..c24c49d9c 100644
--- a/numeric.c
+++ b/numeric.c
@@ -1483,7 +1483,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");
}