Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

matz

git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information...
commit 846ce3e7cec9b173d8d5c4808f84dd75947bb101 1 parent 46b28a7
matz authored
View
13 ChangeLog
@@ -1,7 +1,20 @@
+Mon Oct 2 05:28:58 2000 akira yamada <akira@ruby-lang.org>
+
+ * string.c (trnext): minus at the end of pattern.
+
Sun Oct 1 00:43:34 2000 WATANABE Hirofumi <eban@ruby-lang.org>
* configure.in: exp-name was wrong on cygwin and mingw32.
+Thu Sep 28 14:57:09 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * regex.c (re_compile_pattern): should try must_string calculation
+ every time.
+
+Tue Sep 19 23:47:44 2000 SHIROYAMA Takayuki <psi@fortune.nest.or.jp>
+
+ * configure.in, config.guess, config.sub: MacOS X support.
+
Wed Sep 27 18:40:05 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
* stable version 1.6.1 released.
View
2  config.guess
@@ -970,7 +970,7 @@ EOF
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
exit 0 ;;
*:Darwin:*:*)
- echo ${UNAME_MACHINE}-apple-darwin${UNAME_RELEASE}
+ echo `uname -p`-apple-darwin${UNAME_RELEASE}
exit 0 ;;
esac
View
16 configure.in
@@ -57,9 +57,11 @@ AC_ARG_ENABLE(fat-binary,
# to ensure AC_HEADER_SYS_WAIT works
AC_DEFINE(_POSIX_SOURCE)
;;
- darwin*)
+ macos*|darwin*)
echo -n "MacOS X (Darwin): "
- TARGET_ARCHS="ppc"
+ if test "$TARGET_ARCHS" = "" ; then
+ TARGET_ARCHS="ppc i386"
+ fi
;;
esac
# /usr/lib/arch_tool -archify_list $TARGET_ARCHS
@@ -164,7 +166,7 @@ case "$target_os" in
nextstep*) ;;
openstep*) ;;
rhapsody*) ;;
-darwin*) ;;
+darwin*) LIBS="-lobjc $LIBS";;
human*) ac_cv_func_getpgrp_void=yes;;
beos*) ;;
cygwin*) rb_cv_have_daylight=no;;
@@ -731,7 +733,7 @@ LIBRUBYARG='$(LIBRUBY_A)'
SOLIBS=
case "$target_os" in
- cygwin*|mingw*|beos*|openstep*|nextstep*|rhapsody*|os2_emx*)
+ cygwin*|mingw*|beos*|openstep*|nextstep*|rhapsody*|darwin*|os2_emx*)
DLDLIBS=""
;;
*)
@@ -900,7 +902,7 @@ test "$program_suffix" != NONE &&
RUBY_INSTALL_NAME="${ri_prefix}ruby${ri_suffix}"
case "$target_os" in
- cygwin*|mingw*|*djgpp*)
+ cygwin*|mingw*|*djgpp*|os2_emx*)
RUBY_LIB_PREFIX="/lib/ruby"
;;
*)
@@ -913,9 +915,9 @@ AC_ARG_WITH(sitedir,
[--with-sitedir=DIR site libraries in DIR [PREFIX/lib/ruby/site_ruby]],
[sitedir=$withval],
[sitedir='${prefix}/lib/ruby/site_ruby'])
-SITE_DIR="`eval "echo ${sitedir}"`"
+SITE_DIR="`eval \"echo ${sitedir}\"`"
case "$target_os" in
- cygwin*|mingw*|*djgpp*)
+ cygwin*|mingw*|*djgpp*|os2_emx*)
RUBY_SITE_LIB_PATH="`expr "$SITE_DIR" : "$prefix\(/.*\)"`" ||
RUBY_SITE_LIB_PATH="$SITE_DIR";;
*)
View
35 lib/find.rb
@@ -10,27 +10,30 @@
module Find
def find(*path)
while file = path.shift
- catch(:prune) {
+ catch(:prune) do
yield file
- if File.lstat(file).directory? then
- d = Dir.open(file)
- begin
- for f in d
- next if f == "." or f == ".."
- if File::ALT_SEPARATOR and file =~ /^(?:[\/\\]|[A-Za-z]:[\/\\]?)$/ then
- f = file + f
- elsif file == "/" then
- f = "/" + f
- else
- f = File.join(file, f)
+ begin
+ if File.lstat(file).directory? then
+ d = Dir.open(file)
+ begin
+ for f in d
+ next if f == "." or f == ".."
+ if File::ALT_SEPARATOR and file =~ /^(?:[\/\\]|[A-Za-z]:[\/\\]?)$/ then
+ f = file + f
+ elsif file == "/" then
+ f = "/" + f
+ else
+ f = File.join(file, f)
+ end
+ path.unshift f
end
- path.unshift f
+ ensure
+ d.close
end
- ensure
- d.close
end
+ rescue Errno::ENOENT
end
- }
+ end
end
end
View
4 lib/mkmf.rb
@@ -343,7 +343,7 @@ def create_makefile(target)
print "creating Makefile\n"
rm_f "conftest*"
STDOUT.flush
- if target.rindex(%r!/!)
+ if target.rindex(%r!/!) #/
target = $'
target_prefix = "/"+$`
else
@@ -529,3 +529,5 @@ def create_makefile(target)
$CFLAGS = idir || ""
$LDFLAGS = ldir || ""
+
+$hdrdir.gsub!('/', '\\') if RUBY_PLATFORM =~ /mswin32/
View
5 main.c
@@ -28,6 +28,11 @@ int _CRT_glob = 0;
#include <console.h>
#endif
+/* to link startup code with ObjC support */
+#if defined(__APPLE__) && defined(__MACH__)
+static void objcdummyfunction( void ) { objc_msgSend(); }
+#endif
+
int
main(argc, argv, envp)
int argc;
View
4 misc/ruby-mode.el
@@ -670,9 +670,9 @@ An end of a defun is found by moving forward from the beginning of one."
(setq font-lock-syntactic-keywords
'(("\\$\\([#\"'`$\\]\\)" 1 (1 . nil))
("\\(#\\)[{$@]" 1 (1 . nil))
- ("\\(/\\).*\\(/\\)"
+ ("\\(/\\)\\([^/]\\|\\\\/\\)*\\(/\\)"
(1 (7 . ?'))
- (2 (7 . ?')))))
+ (3 (7 . ?')))))
(make-local-variable 'font-lock-defaults)
(setq font-lock-defaults '((ruby-font-lock-keywords) nil nil))
(setq font-lock-keywords ruby-font-lock-keywords)))
View
2  regex.c
@@ -2395,7 +2395,7 @@ re_compile_pattern(pattern, size, bufp)
bufp->must = laststart+1;
}
}
- else {
+ if (!bufp->must) {
bufp->must = calculate_must_string(bufp->buffer, b);
}
if (current_mbctype == MBCTYPE_SJIS) bufp->options |= RE_OPTIMIZE_NO_BM;
View
4 ruby.c
@@ -205,7 +205,7 @@ ruby_incpush(path)
void
ruby_init_loadpath()
{
-#if defined(_WIN32) || defined(DJGPP)
+#if defined(_WIN32) || defined(DJGPP) || defined(__EMX__)
char libpath[FILENAME_MAX+1];
char *p;
size_t rest;
@@ -214,6 +214,8 @@ ruby_init_loadpath()
#elif defined(DJGPP)
extern char *__dos_argv0;
strncpy(libpath, __dos_argv0, FILENAME_MAX);
+#elif defined(__EMX__)
+ _execname(libpath, FILENAME_MAX);
#endif
p = strrchr(libpath, '\\');
if (p) {
View
2  sample/occur2.rb
@@ -5,7 +5,7 @@
for word in $_.split(/\W+/)
begin
freq[word] = freq[word] + 1
- rescue
+ rescue NameError
freq[word] = 1
end
end
View
2  string.c
@@ -1797,7 +1797,7 @@ trnext(t)
if (!t->gen) {
if (t->p == t->pend) return -1;
t->now = *(USTR)t->p++;
- if (t->p < t->pend && *t->p == '-') {
+ if (t->p < t->pend - 1 && *t->p == '-') {
t->p++;
if (t->p < t->pend) {
if (t->now > *(USTR)t->p) {
View
10 win32/win32.c
@@ -1904,7 +1904,6 @@ myselect (int nfds, fd_set *rd, fd_set *wr, fd_set *ex,
long r;
fd_set file_rd;
fd_set file_wr;
- fd_set trap;
int file_nfds;
int trap_immediate = rb_trap_immediate;
@@ -1925,16 +1924,9 @@ myselect (int nfds, fd_set *rd, fd_set *wr, fd_set *ex,
if (wr) *wr = file_wr;
return file_nfds;
}
- if (ex)
- trap = *ex;
- else
- trap.fd_count = 0;
- if (trap.fd_count < FD_SETSIZE)
- trap.fd_array[trap.fd_count++] = rb_InterruptEvent;
- // else unable to catch interrupt.
if (trap_immediate)
TRAP_END;
- if ((r = select (nfds, rd, wr, &trap, timeout)) == SOCKET_ERROR) {
+ if ((r = select (nfds, rd, wr, ex, timeout)) == SOCKET_ERROR) {
errno = WSAGetLastError();
switch (errno) {
case WSAEINTR:
Please sign in to comment.
Something went wrong with that request. Please try again.