* numeric.c (num_step): better iteration condition for float

values;  suggested by Masahiro TANAKA <masa@ir.isas.ac.jp>.

* range.c (range_step): step (for Range#step method) <= 0 makes no
  sence, thus ArgError will be raised.

* range.c (range_each): Range#each method is special case for
  Range#step(1)

* file.c (rb_find_file): load must be done from an abolute path if
  $SAFE >= 4.

* enum.c (enum_partition): new method. [new]

* re.c (rb_reg_s_quote): quote whitespaces for /x cases.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2002-05-01 09:41:50 +00:00
parent ca55fe4f0d
commit 4fa0cdea78
7 changed files with 155 additions and 104 deletions

4
file.c
View file

@ -2482,6 +2482,10 @@ rb_find_file(path)
if (file_load_ok(f)) return path;
}
if (rb_safe_level() >= 4) {
rb_raise(rb_eSecurityError, "loading from non-absolute path %s", f);
}
if (rb_load_path) {
int i;