Skip to content

Commit 707a0a9

Browse files
author
matz
committed
1.1c3
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent 39ac1d7 commit 707a0a9

25 files changed

+288
-210
lines changed

ChangeLog

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1+
Thu Aug 27 12:54:28 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
2+
3+
* version 1.1c3 released.
4+
5+
Wed Aug 26 11:47:00 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
6+
7+
* regex.c (re_match): pop non-greedy stack elements on success.
8+
9+
Wed Aug 26 09:25:35 1998 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
10+
11+
* ruby.h: add #define environ for cygwin32.
12+
13+
Mon Aug 24 18:46:44 1998 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
14+
15+
* dln.c (dln_find_1): path check was too strict.
16+
17+
Mon Aug 24 15:28:11 1998 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
18+
19+
* parse.y (f_arglist): opt_nl added after f_args.
20+
21+
Wed Aug 19 00:31:09 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
22+
23+
* io.c (io_ctl): forgot to place TRAP_END at right position.
24+
125
Fri Aug 14 11:01:47 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
226

327
* eval.c (call_trace_func): save __FILE__, __LINE__ before

MANIFEST

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ lib/ping.rb
116116
lib/pstore.rb
117117
lib/rational.rb
118118
lib/readbytes.rb
119+
lib/shell.rb
119120
lib/shellwords.rb
120121
lib/singleton.rb
121122
lib/sync.rb
@@ -186,9 +187,10 @@ sample/less.rb
186187
sample/list.rb
187188
sample/list2.rb
188189
sample/list3.rb
189-
sample/mrshtest.rb
190+
sample/mine.rb
190191
sample/mkproto.rb
191192
sample/mpart.rb
193+
sample/mrshtest.rb
192194
sample/observ.rb
193195
sample/occur.pl
194196
sample/occur.rb

dln.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ int eaccess();
7878
#endif
7979

8080
#ifndef FUNCNAME_PATTERN
81-
# if defined(__hp9000s300) || defined(__NetBSD__) || defined(__BORLANDC__) || defined(__FreeBSD__) || defined(NeXT)
81+
# if defined(__hp9000s300) || defined(__NetBSD__) || defined(__BORLANDC__) || defined(__FreeBSD__) || defined(NeXT) || defined(__WATCOMC__)
8282
# define FUNCNAME_PATTERN "_Init_%.200s"
8383
# else
8484
# define FUNCNAME_PATTERN "Init_%.200s"
@@ -1565,11 +1565,13 @@ dln_find_1(fname, path, exe_flag)
15651565
if (fname[0] == '/') return fname;
15661566
if (strncmp("./", fname, 2) == 0 || strncmp("../", fname, 3) == 0)
15671567
return fname;
1568+
if (exe_flag && strchr(fname, '/')) return fname;
15681569
#if defined(MSDOS) || defined(NT) || defined(__human68k__)
15691570
if (fname[0] == '\\') return fname;
15701571
if (strlen(fname) > 2 && fname[1] == ':') return fname;
15711572
if (strncmp(".\\", fname, 2) == 0 || strncmp("..\\", fname, 3) == 0)
15721573
return fname;
1574+
if (exe_flag && strchr(fname, '\\')) return fname;
15731575
#endif
15741576
#endif /* __MACOS__ */
15751577

eval.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1453,7 +1453,7 @@ is_defined(self, node, buf)
14531453
break;
14541454

14551455
case NODE_CVAR:
1456-
if (ev_const_defined(the_frame->cbase, node->nd_vid)) {
1456+
if (ev_const_defined((NODE*)the_frame->cbase, node->nd_vid)) {
14571457
return "constant";
14581458
}
14591459
break;
@@ -2175,7 +2175,7 @@ rb_eval(self, node)
21752175
val = rb_eval(self, node->nd_value);
21762176
/* check for static scope constants */
21772177
if (RTEST(verbose) &&
2178-
ev_const_defined(the_frame->cbase, node->nd_vid)) {
2178+
ev_const_defined((NODE*)the_frame->cbase, node->nd_vid)) {
21792179
Warning("already initialized constant %s",
21802180
rb_id2name(node->nd_vid));
21812181
}
@@ -2204,7 +2204,7 @@ rb_eval(self, node)
22042204
break;
22052205

22062206
case NODE_CVAR:
2207-
result = ev_const_get(the_frame->cbase, node->nd_vid);
2207+
result = ev_const_get((NODE*)the_frame->cbase, node->nd_vid);
22082208
break;
22092209

22102210
case NODE_BLOCK_ARG:

ext/dbm/extconf.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
require 'mkmf'
22
$LDFLAGS = "-L/usr/local/lib"
3-
have_library("gdbm", "dbm_open") or have_library("dbm", "dbm_open")
3+
have_library("gdbm", "dbm_open") or
4+
have_library("db", "dbm_open") or
5+
have_library("dbm", "dbm_open")
46
if have_func("dbm_open")
57
have_func("dbm_clearerr")
68
create_makefile("dbm")

gc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ gc_sweep()
608608

609609
while (p < pend) {
610610
if (!(p->as.basic.flags & FL_MARK)) {
611-
if (p->as.basic.flags) obj_free(p);
611+
if (p->as.basic.flags) obj_free((VALUE)p);
612612
p->as.free.flag = 0;
613613
p->as.free.next = nfreelist;
614614
nfreelist = p;
@@ -1017,7 +1017,7 @@ gc_call_finalizer_at_exit()
10171017
for (i = 0; i < heaps_used; i++) {
10181018
p = heaps[i]; pend = p + HEAP_SLOTS;
10191019
while (p < pend) {
1020-
run_final(p);
1020+
run_final((VALUE)p);
10211021
p++;
10221022
}
10231023
}

hash.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ static VALUE
535535
hash_each_value(hash)
536536
VALUE hash;
537537
{
538-
hash_foreach(hash, each_value_i);
538+
hash_foreach(hash, each_value_i, 0);
539539
return hash;
540540
}
541541

@@ -552,7 +552,7 @@ static VALUE
552552
hash_each_key(hash)
553553
VALUE hash;
554554
{
555-
hash_foreach(hash, each_key_i);
555+
hash_foreach(hash, each_key_i, 0);
556556
return hash;
557557
}
558558

instruby.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
bindir = prefix + "/bin"
1717
libdir = prefix + "/lib/" + ruby_install_name
1818
archdir = libdir+"/"+CONFIG["arch"]
19-
mandir = CONFIG["mandir"] + "/man1"
19+
mandir = prefix + "/man/man1"
2020

2121
File.makedirs bindir, TRUE
2222
File.install "ruby#{binsuffix}",

io.c

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1841,7 +1841,7 @@ f_gets()
18411841
static VALUE
18421842
f_readline(argc, argv)
18431843
int argc;
1844-
VALUE argv;
1844+
VALUE *argv;
18451845
{
18461846
VALUE line = f_gets_method(argc, argv);
18471847

@@ -1929,7 +1929,7 @@ f_readchar()
19291929
static VALUE
19301930
f_readlines(argc, argv)
19311931
int argc;
1932-
VALUE argv;
1932+
VALUE *argv;
19331933
{
19341934
VALUE line, ary;
19351935

@@ -1988,7 +1988,7 @@ f_select(argc, argv, obj)
19881988
struct timeval *tp, timerec;
19891989
OpenFile *fptr;
19901990
int i, max = 0, n;
1991-
int interrupt = 0;
1991+
int interrupt_flag = 0;
19921992
int pending = 0;
19931993

19941994
rb_scan_args(argc, argv, "13", &read, &write, &except, &timeout);
@@ -2079,7 +2079,7 @@ f_select(argc, argv, obj)
20792079
rb_sys_fail(0);
20802080
}
20812081
if (tp == NULL) goto retry;
2082-
interrupt = 1;
2082+
interrupt_flag = 1;
20832083
}
20842084
#endif
20852085
if (!pending && n == 0) return Qnil; /* returns nil on timeout */
@@ -2089,7 +2089,7 @@ f_select(argc, argv, obj)
20892089
ary_push(res, wp?ary_new():ary_new2(0));
20902090
ary_push(res, ep?ary_new():ary_new2(0));
20912091

2092-
if (interrupt == 0) {
2092+
if (interrupt_flag == 0) {
20932093
if (rp) {
20942094
list = RARRAY(res)->ptr[0];
20952095
for (i=0; i< RARRAY(read)->len; i++) {
@@ -2181,19 +2181,21 @@ io_ctl(io, req, arg, io_p)
21812181
narg = (long)RSTRING(arg)->ptr;
21822182
}
21832183
fd = fileno(fptr->f);
2184-
TRAP_BEG;
21852184
#ifdef HAVE_FCNTL
2185+
TRAP_BEG;
21862186
# ifdef USE_CWGUSI
21872187
retval = io_p?ioctl(fd, cmd, (void*) narg):fcntl(fd, cmd, narg);
21882188
# else
21892189
retval = io_p?ioctl(fd, cmd, narg):fcntl(fd, cmd, narg);
21902190
# endif
2191-
#else
21922191
TRAP_END;
2192+
#else
21932193
if (!io_p) {
21942194
rb_notimplement();
21952195
}
2196+
TRAP_BEG;
21962197
retval = ioctl(fd, cmd, narg);
2198+
TRAP_END;
21972199
#endif
21982200
if (retval < 0) rb_sys_fail(fptr->path);
21992201
if (TYPE(arg) == T_STRING && RSTRING(arg)->ptr[len] != 17) {
@@ -2500,7 +2502,7 @@ arg_readchar()
25002502
static VALUE
25012503
arg_each_line(argc, argv)
25022504
int argc;
2503-
VALUE argv;
2505+
VALUE *argv;
25042506
{
25052507
VALUE str;
25062508

lib/e2mmap.rb

Lines changed: 38 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,30 @@
11
#
22
# e2mmap.rb - for ruby 1.1
3-
# $Release Version: 1.1$
4-
# $Revision: 1.7 $
5-
# $Date: 1998/05/19 04:38:33 $
3+
# $Release Version: 1.2$
4+
# $Revision: 1.8 $
5+
# $Date: 1998/08/19 15:22:22 $
66
# by Keiju ISHITSUKA
77
#
88
# --
9+
# Usage:
10+
#
11+
# class Foo
12+
# extend Exception2MassageMapper
13+
# def_exception :NewExceptionClass, "message..."[, superclass]
14+
# def_e2meggage ExistingExceptionClass, "message..."
15+
# ...
16+
# end
17+
#
18+
# Foo.Fail NewExceptionClass, arg...
19+
# Foo.Fail ExistingExceptionClass, arg...
920
#
1021
#
1122
if VERSION < "1.1"
1223
require "e2mmap1_0.rb"
1324
else
1425

1526
module Exception2MessageMapper
16-
RCS_ID='-$Header: /home/keiju/var/src/var.lib/ruby/RCS/e2mmap.rb,v 1.7 1998/05/19 04:38:33 keiju Exp keiju $-'
27+
@RCS_ID='-$Id: e2mmap.rb,v 1.8 1998/08/19 15:22:22 keiju Exp keiju $-'
1728

1829
E2MM = Exception2MessageMapper
1930

@@ -29,10 +40,14 @@ def E2MM.extend_to(b)
2940
end
3041

3142
# public :fail
32-
# alias e2mm_fail fail
43+
alias fail! fail
44+
45+
#def fail(err = nil, *rest)
46+
# super
47+
#end
3348

34-
def fail(err = nil, *rest)
35-
Exception2MessageMapper.fail Exception2MessageMapper::ErrNotRegisteredException, err.to_s
49+
def Fail(err = nil, *rest)
50+
Exception2MessageMapper.Fail Exception2MessageMapper::ErrNotRegisteredException, err.inspect
3651
end
3752

3853
def bind(cl)
@@ -42,6 +57,22 @@ def bind(cl)
4257
# err: Exception
4358
# rest: Parameter accompanied with the exception
4459
#
60+
def self.Fail(err = nil, *rest)
61+
if form = E2MM_ErrorMSG[err]
62+
$! = err.new(sprintf(form, *rest))
63+
$@ = caller(0) if $@.nil?
64+
$@.shift
65+
# e2mm_fail()
66+
raise()
67+
# elsif self == Exception2MessageMapper
68+
# fail Exception2MessageMapper::ErrNotRegisteredException, err.to_s
69+
else
70+
# print "super\n"
71+
super
72+
end
73+
end
74+
75+
# ²áµî¤Î¸ß´¹À­¤Î¤¿¤á
4576
def self.fail(err = nil, *rest)
4677
if form = E2MM_ErrorMSG[err]
4778
$! = err.new(sprintf(form, *rest))

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy