Skip to content

Commit 3597f08

Browse files
author
matz
committed
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_4@862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent 6759827 commit 3597f08

File tree

6 files changed

+19
-6
lines changed

6 files changed

+19
-6
lines changed

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
Sat Jul 29 23:42:04 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
2+
3+
* dir.c (dir_each): should check whether dir is closed during the
4+
block execution. (ruby-bugs:#PR47)
5+
16
Sat Jul 29 21:57:30 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
27

38
* ruby.c (rubylib_mangle): provide another buffer for the result.

configure.in

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -764,9 +764,12 @@ case "$host_os" in
764764
openstep*)
765765
CFLAGS="$CFLAGS -pipe"
766766
;;
767-
rhasody*)
767+
rhapsody*)
768768
CFLAGS="$CFLAGS -pipe -no-precomp"
769769
;;
770+
os2_emx)
771+
CFLAGS="$CFLAGS -DOS2"
772+
;;
770773
*)
771774
;;
772775
esac

defines.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
#endif
2929
#define S_IXGRP 0000010 /* execute/search permission, group */
3030
#define S_IXOTH 0000001 /* execute/search permission, other */
31+
32+
#define HAVE_SYS_WAIT_H /* configure fails to find this */
3133
#endif /* NeXT */
3234

3335
#ifdef NT

dir.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ dir_each(dir)
305305
for (dp = readdir(dirp); dp != NULL; dp = readdir(dirp)) {
306306
file = rb_tainted_str_new(dp->d_name, NAMLEN(dp));
307307
rb_yield(file);
308+
if (DATA_PTR(dir) == NULL) dir_closed();
308309
}
309310
return dir;
310311
}

lib/weakref.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,13 @@ def initialize(orig)
4545
@__id = orig.__id__
4646
ObjectSpace.call_finalizer orig
4747
ObjectSpace.call_finalizer self
48-
ID_MAP[@__id] = [] unless ID_MAP[@__id]
48+
begin
49+
__old_status = Thread.critical
50+
Thread.critical = true
51+
ID_MAP[@__id] = [] unless ID_MAP[@__id]
52+
ensure
53+
Thread.critical = __old_status
54+
end
4955
ID_MAP[@__id].push self.__id__
5056
ID_REV_MAP[self.id] = @__id
5157
end

regex.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,6 @@ typedef struct
183183
} regmatch_t;
184184

185185

186-
#ifdef NeXT
187-
#define re_match rre_match
188-
#endif
189-
190186
#ifdef __STDC__
191187

192188
extern char *re_compile_pattern (const char *, int, struct re_pattern_buffer *);

0 commit comments

Comments
 (0)