1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* eval.c (rb_add_method): should not call rb_secure(), for

last_func may not be set.

* io.c (rb_io_ctl): ioctl should accept any integer within C long
  range.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2001-06-05 06:40:50 +00:00
parent 3f9fd4191b
commit 25443ab13b
4 changed files with 14 additions and 6 deletions

View file

@ -1,3 +1,11 @@
Tue Jun 5 15:16:06 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
* eval.c (rb_add_method): should not call rb_secure(), for
last_func may not be set.
* io.c (rb_io_ctl): ioctl should accept any integer within C long
range.
Tue Jun 5 13:41:13 2001 WATANABE Hirofumi <eban@ruby-lang.org>
* ext/etc/extconf.rb: use egrep_cpp.

5
eval.c
View file

@ -227,10 +227,7 @@ rb_add_method(klass, mid, node, noex)
NODE *body;
if (NIL_P(klass)) klass = rb_cObject;
if (klass == rb_cObject) {
rb_secure(4);
}
if (rb_safe_level() >= 4 && !OBJ_TAINTED(klass)) {
if (rb_safe_level() >= 4 && (klass == rb_cObject || !OBJ_TAINTED(klass))) {
rb_raise(rb_eSecurityError, "Insecure: can't define method");
}
if (OBJ_FROZEN(klass)) rb_error_frozen("class/module");

3
io.c
View file

@ -2842,6 +2842,9 @@ rb_io_ctl(io, req, arg, io_p)
else if (arg == Qtrue) {
narg = 1;
}
else if (rb_obj_is_kind_of(arg, rb_cInteger)) {
narg = NUM2LONG(arg);
}
else {
Check_Type(arg, T_STRING);

View file

@ -1,4 +1,4 @@
#define RUBY_VERSION "1.6.4"
#define RUBY_RELEASE_DATE "2001-06-04"
#define RUBY_RELEASE_DATE "2001-06-05"
#define RUBY_VERSION_CODE 164
#define RUBY_RELEASE_CODE 20010604
#define RUBY_RELEASE_CODE 20010605