зеркало из https://github.com/github/ruby.git
* eval.c (rb_yield_0): should not re-submit TAG_BREAK if this
yield is not break destination. [ruby-dev:23197] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
5bf9610130
Коммит
2fab242f66
|
@ -3,6 +3,11 @@ Mon Mar 15 10:14:51 2004 GOTOU Yuuzou <gotoyuzo@notwork.org>
|
||||||
* ext/openssl/lib/openssl/ssl.rb (OpenSSL::SSL::SocketForwarder):
|
* ext/openssl/lib/openssl/ssl.rb (OpenSSL::SSL::SocketForwarder):
|
||||||
add do_not_reverse_lookup.
|
add do_not_reverse_lookup.
|
||||||
|
|
||||||
|
Mon Mar 15 07:39:13 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
|
* eval.c (rb_yield_0): should not re-submit TAG_BREAK if this
|
||||||
|
yield is not break destination. [ruby-dev:23197]
|
||||||
|
|
||||||
Sun Mar 14 22:07:38 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Sun Mar 14 22:07:38 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* eval.c (rb_thread_raise): err at unstarted thread. (PR#1302)
|
* eval.c (rb_thread_raise): err at unstarted thread. (PR#1302)
|
||||||
|
|
2
bignum.c
2
bignum.c
|
@ -1599,7 +1599,7 @@ rb_big_pow(x, y)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case T_FIXNUM:
|
case T_FIXNUM:
|
||||||
yy = NUM2LONG(y);
|
yy = FIX2LONG(y);
|
||||||
if (yy > 0) {
|
if (yy > 0) {
|
||||||
VALUE z = x;
|
VALUE z = x;
|
||||||
|
|
||||||
|
|
3
error.c
3
error.c
|
@ -259,6 +259,9 @@ rb_check_type(x, t)
|
||||||
else if (FIXNUM_P(x)) {
|
else if (FIXNUM_P(x)) {
|
||||||
etype = "Fixnum";
|
etype = "Fixnum";
|
||||||
}
|
}
|
||||||
|
else if (SYMBOL_P(x)) {
|
||||||
|
etype = "Symbol";
|
||||||
|
}
|
||||||
else if (rb_special_const_p(x)) {
|
else if (rb_special_const_p(x)) {
|
||||||
etype = RSTRING(rb_obj_as_string(x))->ptr;
|
etype = RSTRING(rb_obj_as_string(x))->ptr;
|
||||||
}
|
}
|
||||||
|
|
3
eval.c
3
eval.c
|
@ -4729,6 +4729,9 @@ rb_yield_0(val, self, klass, flags, avalue)
|
||||||
if (TAG_DST()) {
|
if (TAG_DST()) {
|
||||||
result = prot_tag->retval;
|
result = prot_tag->retval;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
lambda = Qtrue; /* just pass TAG_BREAK */
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
4
io.c
4
io.c
|
@ -2869,7 +2869,7 @@ rb_open_file(argc, argv, io)
|
||||||
|
|
||||||
if (FIXNUM_P(vmode) || !NIL_P(perm)) {
|
if (FIXNUM_P(vmode) || !NIL_P(perm)) {
|
||||||
if (FIXNUM_P(vmode)) {
|
if (FIXNUM_P(vmode)) {
|
||||||
flags = NUM2INT(vmode);
|
flags = FIX2INT(vmode);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
SafeStringValue(vmode);
|
SafeStringValue(vmode);
|
||||||
|
@ -2937,7 +2937,7 @@ rb_io_s_sysopen(argc, argv)
|
||||||
SafeStringValue(fname);
|
SafeStringValue(fname);
|
||||||
|
|
||||||
if (NIL_P(vmode)) flags = O_RDONLY;
|
if (NIL_P(vmode)) flags = O_RDONLY;
|
||||||
else if (FIXNUM_P(vmode)) flags = NUM2INT(vmode);
|
else if (FIXNUM_P(vmode)) flags = FIX2INT(vmode);
|
||||||
else {
|
else {
|
||||||
SafeStringValue(vmode);
|
SafeStringValue(vmode);
|
||||||
flags = rb_io_mode_modenum(RSTRING(vmode)->ptr);
|
flags = rb_io_mode_modenum(RSTRING(vmode)->ptr);
|
||||||
|
|
2
random.c
2
random.c
|
@ -266,7 +266,7 @@ rb_f_rand(argc, argv, obj)
|
||||||
vmax = rb_Integer(vmax);
|
vmax = rb_Integer(vmax);
|
||||||
if (TYPE(vmax) == T_BIGNUM) goto bignum;
|
if (TYPE(vmax) == T_BIGNUM) goto bignum;
|
||||||
case T_FIXNUM:
|
case T_FIXNUM:
|
||||||
max = NUM2LONG(vmax);
|
max = FIX2LONG(vmax);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
2
signal.c
2
signal.c
|
@ -555,7 +555,7 @@ trap(arg)
|
||||||
|
|
||||||
switch (TYPE(arg->sig)) {
|
switch (TYPE(arg->sig)) {
|
||||||
case T_FIXNUM:
|
case T_FIXNUM:
|
||||||
sig = NUM2INT(arg->sig);
|
sig = FIX2INT(arg->sig);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case T_SYMBOL:
|
case T_SYMBOL:
|
||||||
|
|
4
string.c
4
string.c
|
@ -1670,7 +1670,7 @@ rb_str_aset(str, indx, val)
|
||||||
switch (TYPE(indx)) {
|
switch (TYPE(indx)) {
|
||||||
case T_FIXNUM:
|
case T_FIXNUM:
|
||||||
num_index:
|
num_index:
|
||||||
idx = NUM2LONG(indx);
|
idx = FIX2LONG(indx);
|
||||||
if (RSTRING(str)->len <= idx) {
|
if (RSTRING(str)->len <= idx) {
|
||||||
out_of_range:
|
out_of_range:
|
||||||
rb_raise(rb_eIndexError, "index %ld out of string", idx);
|
rb_raise(rb_eIndexError, "index %ld out of string", idx);
|
||||||
|
@ -1685,7 +1685,7 @@ rb_str_aset(str, indx, val)
|
||||||
RSTRING(str)->len += 1;
|
RSTRING(str)->len += 1;
|
||||||
RESIZE_CAPA(str, RSTRING(str)->len);
|
RESIZE_CAPA(str, RSTRING(str)->len);
|
||||||
}
|
}
|
||||||
RSTRING(str)->ptr[idx] = NUM2INT(val) & 0xff;
|
RSTRING(str)->ptr[idx] = FIX2INT(val) & 0xff;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
rb_str_splice(str, idx, 1, val);
|
rb_str_splice(str, idx, 1, val);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче