1
0
Fork 0
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/branches/ruby_1_8@5953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2004-03-15 02:33:03 +00:00
parent d50c046da0
commit 525aa2dab6
8 changed files with 18 additions and 7 deletions

View file

@ -1,3 +1,8 @@
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]
Sat Mar 13 14:28:16 2004 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp>
* test/drb/test_drbssl.rb: rescue LoadError. (Barkport from main

View file

@ -1583,7 +1583,7 @@ rb_big_pow(x, y)
break;
case T_FIXNUM:
yy = NUM2LONG(y);
yy = FIX2LONG(y);
if (yy > 0) {
VALUE z = x;

View file

@ -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
View file

@ -4739,6 +4739,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
View file

@ -2798,7 +2798,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);
@ -2866,7 +2866,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);

View file

@ -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;
}

View file

@ -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:

View file

@ -1692,7 +1692,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);
@ -1707,7 +1707,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);