matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
11fef7fd63
commit
c7d499225b
25
ChangeLog
25
ChangeLog
@ -1,3 +1,24 @@
|
|||||||
|
Sat Jul 1 15:22:35 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
|
||||||
|
|
||||||
|
* eval.c (rb_eval): the value from RTEST() is not valid Ruby
|
||||||
|
objct. result shoule be either true or false.
|
||||||
|
|
||||||
|
Sat Jul 1 09:30:06 2000 Katsuyuki Komatsu <komatsu@sarion.co.jp>
|
||||||
|
|
||||||
|
* re.c (rb_reg_initialize): was freeing invalid pointer.
|
||||||
|
|
||||||
|
Sat Jul 1 03:25:56 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
|
||||||
|
|
||||||
|
* parse.y (call_args): command_call can be the last argument of
|
||||||
|
call_args. It had to be the only argument.
|
||||||
|
|
||||||
|
* re.c (rb_reg_s_quote): should not dump core even for unsane mbc
|
||||||
|
string.
|
||||||
|
|
||||||
|
Fri Jun 30 01:36:20 2000 Aleksi Niemela <aleksi.niemela@cinnober.com>
|
||||||
|
|
||||||
|
* parse.y (f_norm_arg): better, nicer error message.
|
||||||
|
|
||||||
Thu Jun 29 07:45:33 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
|
Thu Jun 29 07:45:33 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
|
||||||
|
|
||||||
* ext/socket/socket.c (udp_send): destination may be packed
|
* ext/socket/socket.c (udp_send): destination may be packed
|
||||||
@ -19,6 +40,10 @@ Wed Jun 28 17:26:06 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
|
|||||||
|
|
||||||
* ruby.c (proc_options): -e, - did not exec -r.
|
* ruby.c (proc_options): -e, - did not exec -r.
|
||||||
|
|
||||||
|
Wed Jun 28 14:52:28 2000 Koga Youichirou <y-koga@mms.mt.nec.co.jp>
|
||||||
|
|
||||||
|
* config.sub: NetBSD/hpcmips support.
|
||||||
|
|
||||||
Wed Jun 28 10:11:06 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
|
Wed Jun 28 10:11:06 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
|
||||||
|
|
||||||
* gc.c: gc trigger threshold changed; GC_NEWOBJ_LIMIT removed,
|
* gc.c: gc trigger threshold changed; GC_NEWOBJ_LIMIT removed,
|
||||||
|
4
config.sub
vendored
4
config.sub
vendored
@ -525,6 +525,10 @@ case $basic_machine in
|
|||||||
basic_machine=i386-unknown
|
basic_machine=i386-unknown
|
||||||
os=-netbsd
|
os=-netbsd
|
||||||
;;
|
;;
|
||||||
|
hpcmips*-*)
|
||||||
|
basic_machine=hpcmips-unknown
|
||||||
|
os=-netbsd
|
||||||
|
;;
|
||||||
netwinder)
|
netwinder)
|
||||||
basic_machine=armv4l-corel
|
basic_machine=armv4l-corel
|
||||||
os=-linux
|
os=-linux
|
||||||
|
2
eval.c
2
eval.c
@ -2311,7 +2311,7 @@ rb_eval(self, n)
|
|||||||
rb_bug("unexpected local variable");
|
rb_bug("unexpected local variable");
|
||||||
}
|
}
|
||||||
if (!RTEST(ruby_scope->local_vars[node->nd_cnt])) {
|
if (!RTEST(ruby_scope->local_vars[node->nd_cnt])) {
|
||||||
result = RTEST(rb_eval(self, node->nd_beg));
|
result = RTEST(rb_eval(self, node->nd_beg)) ? Qtrue : Qfalse;
|
||||||
ruby_scope->local_vars[node->nd_cnt] = result;
|
ruby_scope->local_vars[node->nd_cnt] = result;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
22
parse.y
22
parse.y
@ -861,14 +861,14 @@ opt_call_args : none
|
|||||||
| call_args opt_nl
|
| call_args opt_nl
|
||||||
|
|
||||||
call_args : command_call
|
call_args : command_call
|
||||||
{
|
|
||||||
value_expr($1);
|
|
||||||
$$ = NEW_LIST($1);
|
|
||||||
}
|
|
||||||
| args ','
|
| args ','
|
||||||
{
|
{
|
||||||
$$ = $1;
|
$$ = $1;
|
||||||
}
|
}
|
||||||
|
| args ',' command_call
|
||||||
|
{
|
||||||
|
$$ = list_append($1, $3);
|
||||||
|
}
|
||||||
| args opt_block_arg
|
| args opt_block_arg
|
||||||
{
|
{
|
||||||
$$ = arg_blk_pass($1, $2);
|
$$ = arg_blk_pass($1, $2);
|
||||||
@ -1592,7 +1592,19 @@ f_args : f_arg ',' f_optarg ',' f_rest_arg opt_f_block_arg
|
|||||||
|
|
||||||
f_norm_arg : tCONSTANT
|
f_norm_arg : tCONSTANT
|
||||||
{
|
{
|
||||||
yyerror("formal argument must not be constant");
|
yyerror("formal argument cannot be a constant");
|
||||||
|
}
|
||||||
|
| tIVAR
|
||||||
|
{
|
||||||
|
yyerror("formal argument cannot be an instance variable");
|
||||||
|
}
|
||||||
|
| tGVAR
|
||||||
|
{
|
||||||
|
yyerror("formal argument cannot be a global variable");
|
||||||
|
}
|
||||||
|
| tCVAR
|
||||||
|
{
|
||||||
|
yyerror("formal argument cannot be a class variable");
|
||||||
}
|
}
|
||||||
| tIDENTIFIER
|
| tIDENTIFIER
|
||||||
{
|
{
|
||||||
|
18
re.c
18
re.c
@ -88,12 +88,6 @@ rb_memcmp(p1, p2, len)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
|
||||||
rb_str_cicmp(str1, str2)
|
|
||||||
VALUE str1, str2;
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
#define REG_CASESTATE FL_USER0
|
#define REG_CASESTATE FL_USER0
|
||||||
#define KCODE_NONE 0
|
#define KCODE_NONE 0
|
||||||
#define KCODE_EUC FL_USER1
|
#define KCODE_EUC FL_USER1
|
||||||
@ -830,7 +824,7 @@ rb_reg_initialize(obj, s, len, options)
|
|||||||
struct RRegexp *re = RREGEXP(obj);
|
struct RRegexp *re = RREGEXP(obj);
|
||||||
|
|
||||||
if (re->ptr) re_free_pattern(re->ptr);
|
if (re->ptr) re_free_pattern(re->ptr);
|
||||||
if (re->str) free(re->ptr);
|
if (re->str) free(re->str);
|
||||||
re->ptr = 0;
|
re->ptr = 0;
|
||||||
re->str = 0;
|
re->str = 0;
|
||||||
|
|
||||||
@ -879,7 +873,7 @@ rb_reg_new(s, len, options)
|
|||||||
NEWOBJ(re, struct RRegexp);
|
NEWOBJ(re, struct RRegexp);
|
||||||
OBJSETUP(re, rb_cRegexp, T_REGEXP);
|
OBJSETUP(re, rb_cRegexp, T_REGEXP);
|
||||||
|
|
||||||
re->ptr = 0; re->len = 0;
|
re->ptr = 0; re->len = 0; re->str = 0;
|
||||||
rb_reg_initialize(re, s, len, options);
|
rb_reg_initialize(re, s, len, options);
|
||||||
return (VALUE)re;
|
return (VALUE)re;
|
||||||
}
|
}
|
||||||
@ -1036,7 +1030,7 @@ rb_reg_s_new(argc, argv, klass)
|
|||||||
{
|
{
|
||||||
NEWOBJ(re, struct RRegexp);
|
NEWOBJ(re, struct RRegexp);
|
||||||
OBJSETUP(re, klass, T_REGEXP);
|
OBJSETUP(re, klass, T_REGEXP);
|
||||||
re->ptr = 0; re->len = 0;
|
re->ptr = 0; re->len = 0; re->str = 0;
|
||||||
rb_obj_call_init((VALUE)re, argc, argv);
|
rb_obj_call_init((VALUE)re, argc, argv);
|
||||||
return (VALUE)re;
|
return (VALUE)re;
|
||||||
}
|
}
|
||||||
@ -1063,11 +1057,11 @@ rb_reg_s_quote(argc, argv)
|
|||||||
tmp = ALLOCA_N(char, len*2);
|
tmp = ALLOCA_N(char, len*2);
|
||||||
t = tmp;
|
t = tmp;
|
||||||
|
|
||||||
for (; s != send; s++) {
|
for (; s < send; s++) {
|
||||||
if (ismbchar(*s)) {
|
if (ismbchar(*s)) {
|
||||||
size_t n = mbclen(*s);
|
size_t n = mbclen(*s);
|
||||||
|
|
||||||
while (n--)
|
while (n-- && s < send)
|
||||||
*t++ = *s++;
|
*t++ = *s++;
|
||||||
s--;
|
s--;
|
||||||
continue;
|
continue;
|
||||||
@ -1146,7 +1140,7 @@ rb_reg_clone(re)
|
|||||||
NEWOBJ(clone, struct RRegexp);
|
NEWOBJ(clone, struct RRegexp);
|
||||||
CLONESETUP(clone, re);
|
CLONESETUP(clone, re);
|
||||||
rb_reg_check(re);
|
rb_reg_check(re);
|
||||||
clone->ptr = 0; clone->len = 0;
|
clone->ptr = 0; clone->len = 0; clone->str = 0;
|
||||||
rb_reg_initialize(clone, RREGEXP(re)->str, RREGEXP(re)->len,
|
rb_reg_initialize(clone, RREGEXP(re)->str, RREGEXP(re)->len,
|
||||||
rb_reg_options(re));
|
rb_reg_options(re));
|
||||||
return (VALUE)re;
|
return (VALUE)re;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user