1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

1.1b9_05_pre1

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 1998-03-26 09:09:41 +00:00
parent cdde29b924
commit fbbd5539ae
10 changed files with 32 additions and 21 deletions

View file

@ -5,6 +5,10 @@ Thu Mar 26 11:51:09 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
* eval.c (block_pass): block argument can be nil, which means no * eval.c (block_pass): block argument can be nil, which means no
block is supplied for the method. block is supplied for the method.
Wed Mar 25 21:20:13 1998 Tadayoshi Funaba <tadf@kt.rim.or.jp>
* string.c (str_reverse_bang): string copied to wrong place.
Wed Mar 25 08:12:07 1998 Yukihiro Matsumoto <matz@netlab.co.jp> Wed Mar 25 08:12:07 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
* numeric.c (flo_modulo): caused SEGV if left operand is not a * numeric.c (flo_modulo): caused SEGV if left operand is not a
@ -29,7 +33,7 @@ Tue Mar 24 12:50:06 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
Mon Mar 23 12:44:12 1998 Yukihiro Matsumoto <matz@netlab.co.jp> Mon Mar 23 12:44:12 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
* string.c (str_chomp_bang): now takes rs as an argument. * string.c (str_chomp_bang): now takes `rs' as an argument.
* eval.c (thread_free): main_thread should not be freed. * eval.c (thread_free): main_thread should not be freed.

View file

@ -42,8 +42,8 @@ OBJS = array.o \
hash.o \ hash.o \
inits.o \ inits.o \
io.o \ io.o \
math.o \
marshal.o \ marshal.o \
math.o \
numeric.o \ numeric.o \
object.o \ object.o \
pack.o \ pack.o \

3
eval.c
View file

@ -4784,7 +4784,8 @@ struct METHOD {
}; };
static void static void
bm_mark(struct METHOD *data) bm_mark(data)
struct METHOD *data;
{ {
gc_mark(data->oklass); gc_mark(data->oklass);
gc_mark(data->klass); gc_mark(data->klass);

View file

@ -1,7 +1,7 @@
#option nodynamic #option nodynamic
#GD #GD
#curses curses
#dbm #dbm
#etc #etc
#fcntl #fcntl

View file

@ -1,8 +1,8 @@
# Delegation class that delegates even methods defined in super class, # Delegation class that delegates even methods defined in super class,
# which can not be covered with normal method_missing hack. # which can not be covered with normal method_missing hack.
# #
# Delegater is the abstract delegation class. Need to redefine # Delegator is the abstract delegation class. Need to redefine
# `__getobj__' method in the subclass. SimpleDelegater is the # `__getobj__' method in the subclass. SimpleDelegator is the
# concrete subclass for simple delegation. # concrete subclass for simple delegation.
# #
# Usage: # Usage:

View file

@ -11,11 +11,11 @@ class String
alias original_succ succ alias original_succ succ
private :original_succ private :original_succ
def mbchar?(c) def mbchar?
if $KCODE =~ /^s/i if $KCODE =~ /^s/i
c =~ /[\x81-\x9f\xe0-\xef][\x40-\x7e\x80-\xfc]/n self =~ /[\x81-\x9f\xe0-\xef][\x40-\x7e\x80-\xfc]/n
elsif $KCODE =~ /^e/i elsif $KCODE =~ /^e/i
c =~ /[\xa1-\xfe][\xa1-\xfe]/n self =~ /[\xa1-\xfe][\xa1-\xfe]/n
else else
FALSE FALSE
end end
@ -25,7 +25,7 @@ class String
if self[-2] && self[-2] & 0x80 != 0 if self[-2] && self[-2] & 0x80 != 0
s = self.dup s = self.dup
s[-1] += 1 s[-1] += 1
s[-1] += 1 if !mbchar?(s) s[-1] += 1 if !s.mbchar?
return s return s
else else
original_succ original_succ
@ -42,7 +42,7 @@ class String
if self[0..-2] == to[0..-2] if self[0..-2] == to[0..-2]
first = self[-2].chr first = self[-2].chr
for c in self[-1] .. to[-1] for c in self[-1] .. to[-1]
if mbchar?(first+c.chr) if first+c.chr.mbchar?
yield self[0..-2]+c.chr yield self[0..-2]+c.chr
end end
end end

View file

@ -1,4 +1,4 @@
/* $RCSfile: dir.h,v $$Revision: 1.1.1.2 $$Date: 1998/01/16 04:14:54 $ /* $RCSfile: dir.h,v $$Revision: 4.0.1.1 $$Date: 91/06/07 11:22:10 $
* *
* (C) Copyright 1987, 1990 Diomidis Spinellis. * (C) Copyright 1987, 1990 Diomidis Spinellis.
* *
@ -6,9 +6,6 @@
* License or the Artistic License, as specified in the README file. * License or the Artistic License, as specified in the README file.
* *
* $Log: dir.h,v $ * $Log: dir.h,v $
* Revision 1.1.1.2 1998/01/16 04:14:54 matz
* *** empty log message ***
*
* Revision 4.0.1.1 91/06/07 11:22:10 lwall * Revision 4.0.1.1 91/06/07 11:22:10 lwall
* patch4: new copyright notice * patch4: new copyright notice
* *
@ -64,7 +61,7 @@ void rewinddir(DIR *dirp);
void closedir(DIR *dirp); void closedir(DIR *dirp);
#endif /* __DIR_INCLUDED */ #endif /* __DIR_INCLUDED */
/* $RCSfile: dir.h,v $$Revision: 1.1.1.2 $$Date: 1998/01/16 04:14:54 $ /* $RCSfile: dir.h,v $$Revision: 1.1.1.2.2.1 $$Date: 1998/01/16 12:36:08 $
* *
* (C) Copyright 1987, 1990 Diomidis Spinellis. * (C) Copyright 1987, 1990 Diomidis Spinellis.
* *
@ -72,6 +69,9 @@ void closedir(DIR *dirp);
* License or the Artistic License, as specified in the README file. * License or the Artistic License, as specified in the README file.
* *
* $Log: dir.h,v $ * $Log: dir.h,v $
* Revision 1.1.1.2.2.1 1998/01/16 12:36:08 matz
* *** empty log message ***
*
* Revision 1.1.1.2 1998/01/16 04:14:54 matz * Revision 1.1.1.2 1998/01/16 04:14:54 matz
* *** empty log message *** * *** empty log message ***
* *
@ -128,7 +128,7 @@ void rewinddir(DIR *dirp);
void closedir(DIR *dirp); void closedir(DIR *dirp);
#endif /* __DIR_INCLUDED */ #endif /* __DIR_INCLUDED */
/* $RCSfile: dir.h,v $$Revision: 1.1.1.2 $$Date: 1998/01/16 04:14:54 $ /* $RCSfile: dir.h,v $$Revision: 1.1.1.2.2.1 $$Date: 1998/01/16 12:36:08 $
* *
* (C) Copyright 1987, 1990 Diomidis Spinellis. * (C) Copyright 1987, 1990 Diomidis Spinellis.
* *
@ -136,6 +136,9 @@ void closedir(DIR *dirp);
* License or the Artistic License, as specified in the README file. * License or the Artistic License, as specified in the README file.
* *
* $Log: dir.h,v $ * $Log: dir.h,v $
* Revision 1.1.1.2.2.1 1998/01/16 12:36:08 matz
* *** empty log message ***
*
* Revision 1.1.1.2 1998/01/16 04:14:54 matz * Revision 1.1.1.2 1998/01/16 04:14:54 matz
* *** empty log message *** * *** empty log message ***
* *

View file

@ -24,7 +24,6 @@
#define F_OK 0 /* does file exist */ #define F_OK 0 /* does file exist */
#define X_OK 1 /* is it executable by caller */ #define X_OK 1 /* is it executable by caller */
#define W_OK 2 /* is it writable by caller */ #define W_OK 2 /* is it writable by caller */
#define R_OK 4 /* is it readable by caller */ #define R_OK 4 /* is it readable by caller */

View file

@ -172,7 +172,11 @@ extern long re_syntax_options;
extern const unsigned char *mbctab; extern const unsigned char *mbctab;
extern int current_mbctype; extern int current_mbctype;
#ifdef __STDC__
void mbcinit (int); void mbcinit (int);
#else
void mbcinit ();
#endif
#undef ismbchar #undef ismbchar
#define ismbchar(c) mbctab[(unsigned char)(c)] #define ismbchar(c) mbctab[(unsigned char)(c)]

View file

@ -1270,16 +1270,16 @@ static VALUE
str_reverse_bang(str) str_reverse_bang(str)
VALUE str; VALUE str;
{ {
UCHAR *s, *e, *p; UCHAR *s, *e, *p, *q;
s = RSTRING(str)->ptr; s = RSTRING(str)->ptr;
e = s + RSTRING(str)->len - 1; e = s + RSTRING(str)->len - 1;
p = ALLOCA_N(char, RSTRING(str)->len); p = q = ALLOCA_N(char, RSTRING(str)->len);
while (e >= s) { while (e >= s) {
*p++ = *e--; *p++ = *e--;
} }
MEMCPY(RSTRING(str)->ptr, p, char, RSTRING(str)->len); MEMCPY(RSTRING(str)->ptr, q, char, RSTRING(str)->len);
return str; return str;
} }