mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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:
parent
5bf9610130
commit
2fab242f66
8 changed files with 18 additions and 7 deletions
|
@ -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):
|
||||
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>
|
||||
|
||||
* 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;
|
||||
|
||||
case T_FIXNUM:
|
||||
yy = NUM2LONG(y);
|
||||
yy = FIX2LONG(y);
|
||||
if (yy > 0) {
|
||||
VALUE z = x;
|
||||
|
||||
|
|
3
error.c
3
error.c
|
@ -259,6 +259,9 @@ rb_check_type(x, t)
|
|||
else if (FIXNUM_P(x)) {
|
||||
etype = "Fixnum";
|
||||
}
|
||||
else if (SYMBOL_P(x)) {
|
||||
etype = "Symbol";
|
||||
}
|
||||
else if (rb_special_const_p(x)) {
|
||||
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()) {
|
||||
result = prot_tag->retval;
|
||||
}
|
||||
else {
|
||||
lambda = Qtrue; /* just pass TAG_BREAK */
|
||||
}
|
||||
break;
|
||||
default:
|
||||
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)) {
|
||||
flags = NUM2INT(vmode);
|
||||
flags = FIX2INT(vmode);
|
||||
}
|
||||
else {
|
||||
SafeStringValue(vmode);
|
||||
|
@ -2937,7 +2937,7 @@ rb_io_s_sysopen(argc, argv)
|
|||
SafeStringValue(fname);
|
||||
|
||||
if (NIL_P(vmode)) flags = O_RDONLY;
|
||||
else if (FIXNUM_P(vmode)) flags = NUM2INT(vmode);
|
||||
else if (FIXNUM_P(vmode)) flags = FIX2INT(vmode);
|
||||
else {
|
||||
SafeStringValue(vmode);
|
||||
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);
|
||||
if (TYPE(vmax) == T_BIGNUM) goto bignum;
|
||||
case T_FIXNUM:
|
||||
max = NUM2LONG(vmax);
|
||||
max = FIX2LONG(vmax);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
2
signal.c
2
signal.c
|
@ -555,7 +555,7 @@ trap(arg)
|
|||
|
||||
switch (TYPE(arg->sig)) {
|
||||
case T_FIXNUM:
|
||||
sig = NUM2INT(arg->sig);
|
||||
sig = FIX2INT(arg->sig);
|
||||
break;
|
||||
|
||||
case T_SYMBOL:
|
||||
|
|
4
string.c
4
string.c
|
@ -1670,7 +1670,7 @@ rb_str_aset(str, indx, val)
|
|||
switch (TYPE(indx)) {
|
||||
case T_FIXNUM:
|
||||
num_index:
|
||||
idx = NUM2LONG(indx);
|
||||
idx = FIX2LONG(indx);
|
||||
if (RSTRING(str)->len <= idx) {
|
||||
out_of_range:
|
||||
rb_raise(rb_eIndexError, "index %ld out of string", idx);
|
||||
|
@ -1685,7 +1685,7 @@ rb_str_aset(str, indx, val)
|
|||
RSTRING(str)->len += 1;
|
||||
RESIZE_CAPA(str, RSTRING(str)->len);
|
||||
}
|
||||
RSTRING(str)->ptr[idx] = NUM2INT(val) & 0xff;
|
||||
RSTRING(str)->ptr[idx] = FIX2INT(val) & 0xff;
|
||||
}
|
||||
else {
|
||||
rb_str_splice(str, idx, 1, val);
|
||||
|
|
Loading…
Reference in a new issue