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:
parent
cdde29b924
commit
fbbd5539ae
10 changed files with 32 additions and 21 deletions
|
@ -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
|
||||
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>
|
||||
|
||||
* 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>
|
||||
|
||||
* 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.
|
||||
|
||||
|
|
|
@ -42,8 +42,8 @@ OBJS = array.o \
|
|||
hash.o \
|
||||
inits.o \
|
||||
io.o \
|
||||
math.o \
|
||||
marshal.o \
|
||||
math.o \
|
||||
numeric.o \
|
||||
object.o \
|
||||
pack.o \
|
||||
|
|
3
eval.c
3
eval.c
|
@ -4784,7 +4784,8 @@ struct METHOD {
|
|||
};
|
||||
|
||||
static void
|
||||
bm_mark(struct METHOD *data)
|
||||
bm_mark(data)
|
||||
struct METHOD *data;
|
||||
{
|
||||
gc_mark(data->oklass);
|
||||
gc_mark(data->klass);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#option nodynamic
|
||||
|
||||
#GD
|
||||
#curses
|
||||
curses
|
||||
#dbm
|
||||
#etc
|
||||
#fcntl
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# Delegation class that delegates even methods defined in super class,
|
||||
# which can not be covered with normal method_missing hack.
|
||||
#
|
||||
# Delegater is the abstract delegation class. Need to redefine
|
||||
# `__getobj__' method in the subclass. SimpleDelegater is the
|
||||
# Delegator is the abstract delegation class. Need to redefine
|
||||
# `__getobj__' method in the subclass. SimpleDelegator is the
|
||||
# concrete subclass for simple delegation.
|
||||
#
|
||||
# Usage:
|
||||
|
|
10
lib/jcode.rb
10
lib/jcode.rb
|
@ -11,11 +11,11 @@ class String
|
|||
alias original_succ succ
|
||||
private :original_succ
|
||||
|
||||
def mbchar?(c)
|
||||
def mbchar?
|
||||
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
|
||||
c =~ /[\xa1-\xfe][\xa1-\xfe]/n
|
||||
self =~ /[\xa1-\xfe][\xa1-\xfe]/n
|
||||
else
|
||||
FALSE
|
||||
end
|
||||
|
@ -25,7 +25,7 @@ class String
|
|||
if self[-2] && self[-2] & 0x80 != 0
|
||||
s = self.dup
|
||||
s[-1] += 1
|
||||
s[-1] += 1 if !mbchar?(s)
|
||||
s[-1] += 1 if !s.mbchar?
|
||||
return s
|
||||
else
|
||||
original_succ
|
||||
|
@ -42,7 +42,7 @@ class String
|
|||
if self[0..-2] == to[0..-2]
|
||||
first = self[-2].chr
|
||||
for c in self[-1] .. to[-1]
|
||||
if mbchar?(first+c.chr)
|
||||
if first+c.chr.mbchar?
|
||||
yield self[0..-2]+c.chr
|
||||
end
|
||||
end
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
|
@ -6,9 +6,6 @@
|
|||
* License or the Artistic License, as specified in the README file.
|
||||
*
|
||||
* $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
|
||||
* patch4: new copyright notice
|
||||
*
|
||||
|
@ -64,7 +61,7 @@ void rewinddir(DIR *dirp);
|
|||
void closedir(DIR *dirp);
|
||||
|
||||
#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.
|
||||
*
|
||||
|
@ -72,6 +69,9 @@ void closedir(DIR *dirp);
|
|||
* License or the Artistic License, as specified in the README file.
|
||||
*
|
||||
* $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
|
||||
* *** empty log message ***
|
||||
*
|
||||
|
@ -128,7 +128,7 @@ void rewinddir(DIR *dirp);
|
|||
void closedir(DIR *dirp);
|
||||
|
||||
#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.
|
||||
*
|
||||
|
@ -136,6 +136,9 @@ void closedir(DIR *dirp);
|
|||
* License or the Artistic License, as specified in the README file.
|
||||
*
|
||||
* $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
|
||||
* *** empty log message ***
|
||||
*
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
|
||||
|
||||
#define F_OK 0 /* does file exist */
|
||||
|
||||
#define X_OK 1 /* is it executable by caller */
|
||||
#define W_OK 2 /* is it writable by caller */
|
||||
#define R_OK 4 /* is it readable by caller */
|
||||
|
|
4
regex.h
4
regex.h
|
@ -172,7 +172,11 @@ extern long re_syntax_options;
|
|||
extern const unsigned char *mbctab;
|
||||
extern int current_mbctype;
|
||||
|
||||
#ifdef __STDC__
|
||||
void mbcinit (int);
|
||||
#else
|
||||
void mbcinit ();
|
||||
#endif
|
||||
|
||||
#undef ismbchar
|
||||
#define ismbchar(c) mbctab[(unsigned char)(c)]
|
||||
|
|
6
string.c
6
string.c
|
@ -1270,16 +1270,16 @@ static VALUE
|
|||
str_reverse_bang(str)
|
||||
VALUE str;
|
||||
{
|
||||
UCHAR *s, *e, *p;
|
||||
UCHAR *s, *e, *p, *q;
|
||||
|
||||
s = RSTRING(str)->ptr;
|
||||
e = s + RSTRING(str)->len - 1;
|
||||
p = ALLOCA_N(char, RSTRING(str)->len);
|
||||
p = q = ALLOCA_N(char, RSTRING(str)->len);
|
||||
|
||||
while (e >= s) {
|
||||
*p++ = *e--;
|
||||
}
|
||||
MEMCPY(RSTRING(str)->ptr, p, char, RSTRING(str)->len);
|
||||
MEMCPY(RSTRING(str)->ptr, q, char, RSTRING(str)->len);
|
||||
|
||||
return str;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue