mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* signal.c (sighandle): should not re-register sighandler if
POSIX_SIGNAL is defined. * eval.c (error_print): errat array may be empty. * eval.c (rb_eval_cmd): should not upgrade safe level unless explicitly specified by argument newly added. * signal.c (sig_trap): should not allow tainted trap closure. * variable.c (rb_f_trace_var): should not allow trace_var on safe level higher than 3. * variable.c (rb_f_trace_var): should not allow tainted trace closure. * gc.c: do not use static stack until system stack overflows. * eval.c (eval): should call Exception#exception instead of calling rb_exc_new3() directly. * error.c (exc_exception): set "mesg" directly to the clone. it might be better to set mesg via some method for flexibility. * variable.c (cvar_override_check): should print original module name, if 'a' is T_ICLASS. * parse.y (yylex): float '1_.0' should not be allowed. * variable.c (var_getter): should care about var as Qfalse (ruby-bugs#PR199). * array.c (cmpint): <=> or block for {min,max} may return bignum. * array.c (sort_1): use rb_compint. * array.c (sort_2): ditto. * enum.c (min_ii): ditto. * enum.c (min_ii): ditto. * enum.c (max_i): ditto. * enum.c (max_ii): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
948ff2456b
commit
7422ccdd9e
14 changed files with 328 additions and 270 deletions
10
enum.c
10
enum.c
|
@ -89,7 +89,7 @@ enum_find(argc, argv, obj)
|
|||
}
|
||||
rb_gc_force_recycle((VALUE)memo);
|
||||
if (!NIL_P(if_none)) {
|
||||
rb_eval_cmd(if_none, rb_ary_new2(0));
|
||||
rb_eval_cmd(if_none, rb_ary_new2(0), 0);
|
||||
}
|
||||
return Qnil;
|
||||
}
|
||||
|
@ -299,7 +299,7 @@ min_i(i, memo)
|
|||
memo->u1.value = i;
|
||||
else {
|
||||
cmp = rb_funcall(i, id_cmp, 1, memo->u1.value);
|
||||
if (NUM2LONG(cmp) < 0)
|
||||
if (rb_cmpint(cmp) < 0)
|
||||
memo->u1.value = i;
|
||||
}
|
||||
return Qnil;
|
||||
|
@ -316,7 +316,7 @@ min_ii(i, memo)
|
|||
memo->u1.value = i;
|
||||
else {
|
||||
cmp = rb_yield(rb_assoc_new(i, memo->u1.value));
|
||||
if (NUM2LONG(cmp) < 0)
|
||||
if (rb_cmpint(cmp) < 0)
|
||||
memo->u1.value = i;
|
||||
}
|
||||
return Qnil;
|
||||
|
@ -344,7 +344,7 @@ max_i(i, memo)
|
|||
memo->u1.value = i;
|
||||
else {
|
||||
cmp = rb_funcall(i, id_cmp, 1, memo->u1.value);
|
||||
if (NUM2LONG(cmp) > 0)
|
||||
if (rb_cmpint(cmp) > 0)
|
||||
memo->u1.value = i;
|
||||
}
|
||||
return Qnil;
|
||||
|
@ -361,7 +361,7 @@ max_ii(i, memo)
|
|||
memo->u1.value = i;
|
||||
else {
|
||||
cmp = rb_yield(rb_assoc_new(i, memo->u1.value));
|
||||
if (NUM2LONG(cmp) > 0)
|
||||
if (rb_cmpint(cmp) > 0)
|
||||
memo->u1.value = i;
|
||||
}
|
||||
return Qnil;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue