Skip to content

Commit

Permalink
1.1b9_05_pre1
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
matz committed Mar 26, 1998
1 parent cdde29b commit fbbd553
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 21 deletions.
6 changes: 5 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
3 changes: 2 additions & 1 deletion eval.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion ext/Setup
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#option nodynamic

#GD
#curses
curses
#dbm
#etc
#fcntl
Expand Down
4 changes: 2 additions & 2 deletions lib/delegate.rb
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
10 changes: 5 additions & 5 deletions lib/jcode.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ def jlength
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
Expand All @@ -25,7 +25,7 @@ def succ
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
Expand All @@ -42,7 +42,7 @@ def upto(to)
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
Expand Down
15 changes: 9 additions & 6 deletions missing/dir.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
/* $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.
*
* You may distribute under the terms of either the GNU General Public
* 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
*
Expand Down Expand Up @@ -64,14 +61,17 @@ 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.
*
* You may distribute under the terms of either the GNU General Public
* 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 ***
*
Expand Down Expand Up @@ -128,14 +128,17 @@ 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.
*
* You may distribute under the terms of either the GNU General Public
* 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 ***
*
Expand Down
1 change: 0 additions & 1 deletion missing/file.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
4 changes: 4 additions & 0 deletions regex.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
6 changes: 3 additions & 3 deletions string.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit fbbd553

Please sign in to comment.