* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@2348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2002-04-10 08:45:26 +00:00
parent ff0abdc55e
commit 19c42c0740
14 changed files with 209 additions and 146 deletions

View file

@ -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");
}