Skip to content

Commit

Permalink
2000-05-24
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
matz committed May 24, 2000
1 parent 24b9bdc commit 8b1de0b
Show file tree
Hide file tree
Showing 49 changed files with 608 additions and 611 deletions.
93 changes: 93 additions & 0 deletions ChangeLog
@@ -1,3 +1,40 @@
Wed May 24 13:12:31 2000 Yukihiro Matsumoto <matz@netlab.co.jp>

* misc/ruby-mode.el (ruby-parse-region): support `while .. do' etc.

Tue May 23 23:50:12 2000 Yukihiro Matsumoto <matz@netlab.co.jp>

* re.c (rb_reg_initialize_m): wrong kcode value.

* re.c (rb_reg_s_new): forgot to initialize re->ptr.

Tue May 23 08:36:24 2000 Yukihiro Matsumoto <matz@netlab.co.jp>

* regex.c (re_compile_pattern): forgot to restore old option
status by (?ix-ix).

* regex.c (re_compile_fastmap): anychar may match newline if
RE_OPTION_MULTILINE or RE_OPTION_POSIXLINE is set.

Mon May 22 21:56:43 2000 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>

* struct.c (rb_struct_getmember): should use ID2SYM, not INT2NUM.

Mon May 22 15:07:37 2000 Yukihiro Matsumoto <matz@netlab.co.jp>

* file.c (rb_find_file): should check if the file really exists.

Mon May 22 09:08:12 2000 Yukihiro Matsumoto <matz@netlab.co.jp>

* io.c (rb_io_popen): _exit(0) after processing block under the
child process.

* io.c (rb_io_popen): flush stdout/stderr before subprocess
termination.

* eval.c (rb_check_safe_str): insert rb_secure(4); operation
requires untainted string should be prohibited in level 4.

Sun May 21 21:17:00 2000 WATANABE Hirofumi <eban@os.rim.or.jp>

* configure.in: add Setup.dj for djgpp cross-compiling.
Expand All @@ -6,6 +43,10 @@ Sun May 21 21:17:00 2000 WATANABE Hirofumi <eban@os.rim.or.jp>

* instruby.rb: copy win32/win32.h to archlibdir on mingw32.

Sun May 21 20:58:08 2000 Katsuyuki Komatsu <komatsu@sarion.co.jp>

* pack.c: fix OFF16 and OFF32 definitions for Alpha and IRIX64.

Sun May 21 17:31:37 2000 WATANABE Hirofumi <eban@os.rim.or.jp>

* instruby.rb: support "make install" for cross-compiling.
Expand All @@ -18,6 +59,53 @@ Sun May 21 14:22:49 2000 WATANABE Hirofumi <eban@os.rim.or.jp>

* configure.in: ditto.

Sat May 20 23:29:14 2000 Yukihiro Matsumoto <matz@netlab.co.jp>

* dir.c (dir_s_new): does not take block; "open" does.

* io.c (rb_io_s_new): ditto.

Fri May 19 07:44:26 2000 Yukihiro Matsumoto <matz@netlab.co.jp>

* dir.c (dir_s_open): Dir#open does not returns closed Dir if a
block is given to the method.

* re.c (rb_reg_initialize_m): Regexp::new calls initialize now.

* string.c (Init_String): String#delete_at removed.

* string.c (rb_str_aset_m): should have checked argc != 2.

* eval.c (rb_thread_schedule): select(2) was called too many.

* regex.c (re_compile_pattern): a bug in (?m) support. Pointed
out by Dave Thomas <Dave@thomases.com>.

Thu May 18 23:55:26 2000 Katsuyuki Komatsu <komatsu@sarion.co.jp>

* dln.c (search_undef): st_lookup()'s 3rd parameter should be
a pointer of the variable which has the same size and alignment
as `char *'.

* marshal.c (w_symbol, w_object): ditto.

* parse.y (rb_intern): ditto.

Thu May 18 13:34:57 2000 Yukihiro Matsumoto <matz@netlab.co.jp>

* ext/socket/socket.c (ruby_connect): should not have replaced
thread_write_select() by rb_thread_fd_writable().

Wed May 18 09:01:25 2000 Katsuyuki Komatsu <komatsu@sarion.co.jp>

* configure.in, ext/extmk.rb.in, lib/mkmf.rb: remove BeOS R3 support.
Make a shared library (libruby.so) only if the --enable-shared
option is specified.

* instruby.rb: no longer use libruby.so.LIB and import.h.

* io.c: fix READ_DATA_PENDING definition for BeOS (PowerPC).

Wed May 17 14:14:23 2000 Yukihiro Matsumoto <matz@netlab.co.jp>

* re.c (rb_reg_new_1): use /m instead of /p.
Expand Down Expand Up @@ -71,6 +159,11 @@ Mon May 15 15:38:09 2000 Yukihiro Matsumoto <matz@netlab.co.jp>

* dir.c (glob): trailing path may be null, e.g. glob("**").

Mon May 15 14:48:41 2000 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>

* io.c (rb_io_pid): new method; returns nil if no process attached
to the IO.

Mon May 15 01:18:20 2000 Yukihiro Matsumoto <matz@netlab.co.jp>

* io.c (rb_io_s_popen): _exit after Proc execution.
Expand Down
4 changes: 2 additions & 2 deletions ToDo
Expand Up @@ -63,7 +63,7 @@ Standard Libraries
- Struct::new([name,]member,...)
- IO#reopen accepts path as well
- Kernel#scan
- call initialize for builtin classes too (not yet: Regexp, Class, Module)
- call initialize for builtin classes too (not yet: Class, Module)
- performance tune for String's non-bang methods.
- 'w' template for pack/unpack
* String#scanf(?)
Expand Down Expand Up @@ -107,6 +107,6 @@ Things To Do Before 1.6

* alternative for $! (exception? in? into? =>?)
* alternative for interator?
* regex - /p, /m
- regex - /p, /m
* odd? even?
* mkmf.rb - create_makefile("net/socket")
40 changes: 21 additions & 19 deletions array.c
Expand Up @@ -584,30 +584,32 @@ rb_ary_aset(argc, argv, ary)
VALUE *argv;
VALUE ary;
{
VALUE arg1, arg2, arg3;
long offset, beg, len;

if (rb_scan_args(argc, argv, "21", &arg1, &arg2, &arg3) == 3) {
rb_ary_replace(ary, NUM2LONG(arg1), NUM2LONG(arg2), arg3);
return arg3;
if (argc == 3) {
rb_ary_replace(ary, NUM2LONG(argv[0]), NUM2LONG(argv[1]), argv[2]);
return argv[2];
}
else if (FIXNUM_P(arg1)) {
offset = FIX2LONG(arg1);
if (argc != 2) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)", argc);
}
if (FIXNUM_P(argv[0])) {
offset = FIX2LONG(argv[0]);
goto fixnum;
}
else if (rb_range_beg_len(arg1, &beg, &len, RARRAY(ary)->len, 1)) {
else if (rb_range_beg_len(argv[0], &beg, &len, RARRAY(ary)->len, 1)) {
/* check if idx is Range */
rb_ary_replace(ary, beg, len, arg2);
return arg2;
rb_ary_replace(ary, beg, len, argv[1]);
return argv[1];
}
if (TYPE(arg1) == T_BIGNUM) {
if (TYPE(argv[0]) == T_BIGNUM) {
rb_raise(rb_eIndexError, "index too big");
}

offset = NUM2LONG(arg1);
offset = NUM2LONG(argv[0]);
fixnum:
rb_ary_store(ary, offset, arg2);
return arg2;
rb_ary_store(ary, offset, argv[1]);
return argv[1];
}

VALUE
Expand Down Expand Up @@ -957,7 +959,7 @@ sort_internal(ary)
VALUE ary;
{
qsort(RARRAY(ary)->ptr, RARRAY(ary)->len, sizeof(VALUE),
rb_iterator_p()?sort_1:sort_2);
rb_block_given_p()?sort_1:sort_2);
return ary;
}

Expand Down Expand Up @@ -997,7 +999,7 @@ rb_ary_collect(ary)
long len, i;
VALUE collect;

if (!rb_iterator_p()) {
if (!rb_block_given_p()) {
return rb_ary_dup(ary);
}

Expand Down Expand Up @@ -1046,7 +1048,7 @@ rb_ary_delete(ary, item)
i2++;
}
if (RARRAY(ary)->len == i2) {
if (rb_iterator_p()) {
if (rb_block_given_p()) {
return rb_yield(item);
}
return Qnil;
Expand Down Expand Up @@ -1081,7 +1083,7 @@ rb_ary_delete_at(ary, pos)
}

static VALUE
rb_ary_delete_at_m(argc, argv, ary)
rb_ary_slice_bang(argc, argv, ary)
int argc;
VALUE *argv;
VALUE ary;
Expand Down Expand Up @@ -1627,7 +1629,7 @@ Init_Array()
rb_define_method(rb_cArray, "map!", rb_ary_collect_bang, 0);
rb_define_method(rb_cArray, "filter", rb_ary_filter, 0);
rb_define_method(rb_cArray, "delete", rb_ary_delete, 1);
rb_define_method(rb_cArray, "delete_at", rb_ary_delete_at_m, -1);
rb_define_method(rb_cArray, "delete_at", rb_ary_delete_at, -1);
rb_define_method(rb_cArray, "delete_if", rb_ary_delete_if, 0);
rb_define_method(rb_cArray, "reject!", rb_ary_delete_if, 0);
rb_define_method(rb_cArray, "replace", rb_ary_replace_m, 1);
Expand All @@ -1637,7 +1639,7 @@ Init_Array()
rb_define_method(rb_cArray, "<=>", rb_ary_cmp, 1);

rb_define_method(rb_cArray, "slice", rb_ary_aref, -1);
rb_define_method(rb_cArray, "slice!", rb_ary_delete_at_m, -1);
rb_define_method(rb_cArray, "slice!", rb_ary_slice_bang, -1);

rb_define_method(rb_cArray, "assoc", rb_ary_assoc, 1);
rb_define_method(rb_cArray, "rassoc", rb_ary_rassoc, 1);
Expand Down
2 changes: 1 addition & 1 deletion class.c
Expand Up @@ -662,7 +662,7 @@ rb_scan_args(argc, argv, fmt, va_alist)

if (*p == '&') {
var = va_arg(vargs, VALUE*);
if (rb_iterator_p()) {
if (rb_block_given_p()) {
*var = rb_f_lambda();
}
else {
Expand Down
4 changes: 0 additions & 4 deletions config.guess
Expand Up @@ -969,10 +969,6 @@ EOF
*:Rhapsody:*:*)
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
exit 0 ;;
*:"Mac OS":*:*)
echo `uname -p`-apple-macos${UNAME_RELEASE}
exit 0 ;;

esac

#echo '(No uname command or uname output not recognized.)' 1>&2
Expand Down
2 changes: 1 addition & 1 deletion config.sub
Expand Up @@ -910,7 +910,7 @@ case $os in
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux* | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -rhapsody* | -openstep* | -macos | -oskit*)
| -interix* | -uwin* | -rhapsody* | -openstep* | -oskit*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
Expand Down
56 changes: 17 additions & 39 deletions configure.in
Expand Up @@ -44,12 +44,6 @@ AC_ARG_ENABLE(fat-binary,
TARGET_ARCHS="ppc i386"
fi
;;
macos*)
echo -n "MacOS X : "
if test "$TARGET_ARCHS" = "" ; then
TARGET_ARCHS="ppc i386"
fi
;;
nextstep*|openstep*)
echo -n "NeXTSTEP/OPENSTEP: "
if test "$TARGET_ARCHS" = "" ; then
Expand Down Expand Up @@ -161,7 +155,6 @@ case "$target_os" in
nextstep*) ;;
openstep*) ;;
rhapsody*) ;;
macos*) ;;
human*) ac_cv_func_getpgrp_void=yes;;
beos*) ;;
cygwin*) ;;
Expand Down Expand Up @@ -424,9 +417,9 @@ if test "$with_dln_a_out" != yes; then
nextstep*) ;;
openstep*) ;;
rhapsody*) ;;
macos*) ;;
human*) ;;
bsdi*) ;;
beos*) ;;
cygwin*) ;;
mingw*) ;;
netbsd*) CCDLFLAGS=-fpic
Expand Down Expand Up @@ -504,10 +497,6 @@ if test "$with_dln_a_out" != yes; then
LDFLAGS=""
DLDFLAGS="$ARCH_FLAG"
rb_cv_dlopen=yes ;;
macos*) LDSHARED='cc -dynamic -bundle -undefined suppress'
LDFLAGS=""
DLDFLAGS="$ARCH_FLAG"
rb_cv_dlopen=yes ;;
aix*) LDSHARED='/usr/ccs/bin/ld'
XLDFLAGS='-Wl,-bE:ruby.imp'
DLDFLAGS='-eInit_$(TARGET) -bI:$(topdir)/ruby.imp -bM:SRE -T512 -H512 -lc'
Expand All @@ -521,14 +510,12 @@ if test "$with_dln_a_out" != yes; then
beos*) case "$target_cpu" in
powerpc*)
LDSHARED="ld -xms"
DLDFLAGS="-f ruby.exp -lbe -lroot glue-noinit.a init_term_dyn.o start_dyn.o"
DLDFLAGS='-export Init_$(TARGET) -lbe -lroot glue-noinit.a init_term_dyn.o start_dyn.o'
;;
i586*)
LDSHARED="ld -shared"
DLDFLAGS="-L/boot/develop/lib/x86 -lbe -lroot"
;;
*)
DLDFLAGS="ruby.def -lbe -lroot glue-noinit.a init_term_dyn.o start_dyn.o"
esac
rb_cv_dlopen=yes ;;
cygwin*|mingw*) : ${LDSHARED="${DLLWRAP} --target=${target_os} --as=${AS} --dlltool-name=${DLLTOOL} --driver-name=${CC} --export-all -s"}
Expand Down Expand Up @@ -576,8 +563,6 @@ else
AC_DEFINE(DLEXT, ".bundle");;
rhapsody*) DLEXT=bundle
AC_DEFINE(DLEXT, ".bundle");;
macos*) DLEXT=bundle
AC_DEFINE(DLEXT, ".bundle");;
os2_emx*) DLEXT=dll
AC_DEFINE(DLEXT, ".dll");;
cygwin*|mingw*) DLEXT=so
Expand Down Expand Up @@ -605,8 +590,6 @@ case "$target_os" in
STRIP='strip -A -n';;
rhapsody*)
STRIP='strip -A -n';;
macos*)
STRIP='strip -A -n';;
esac

EXTSTATIC=
Expand Down Expand Up @@ -705,28 +688,9 @@ LIBRUBY_A='lib$(RUBY_INSTALL_NAME).a'
LIBRUBY='$(LIBRUBY_A)'
LIBRUBYARG='$(LIBRUBY_A)'
SOLIBS=
if test "$target_os" = "beos"; then
LIBRUBY='$(LIBRUBY_SO)'
LIBRUBYARG='-l$(RUBY_INSTALL_NAME)'
SOLIBS='-lnet'
echo creating ruby.def
case "$target_cpu" in
powerpc*)
cp beos/ruby.def.in ruby.exp
CFLAGS="$CFLAGS -relax_pointers"
;;
i586*)
LDFLAGS="$LDFLAGS -L."
;;
*)
echo EXPORTS > ruby.def
cat beos/ruby.def.in >> ruby.def
;;
esac
fi

case "$target_os" in
cygwin*|mingw*|beos*|openstep*|nextstep*|rhapsody*|macos*|os2_emx*)
cygwin*|mingw*|beos*|openstep*|nextstep*|rhapsody*|os2_emx*)
DLDLIBS=""
;;
*)
Expand Down Expand Up @@ -787,6 +751,13 @@ if test "$enable_shared" = 'yes'; then
LIBRUBYARG='-L${prefix}/lib -Wl,lib$(RUBY_INSTALL_NAME).so'
SOLIBS='-lm -lc'
;;
beos*)
case "$target_cpu" in
powerpc*)
LIBRUBY_DLDFLAGS='-f ruby.exp -lnet -lbe -lroot glue-noinit.a init_term_dyn.o start_dyn.o'
;;
esac
;;
cygwin*|mingw*)
LIBRUBY_SO='lib$(RUBY_INSTALL_NAME).a'
LIBRUBY_ALIASES=''
Expand Down Expand Up @@ -834,6 +805,13 @@ case "$target_os" in
CFLAGS="$CFLAGS -std"
fi
;;
beos*)
case "$target_cpu" in
powerpc*)
CFLAGS="$CFLAGS -relax_pointers"
;;
esac
;;
cygwin*)
LIBOBJS="$LIBOBJS strftime.o"
;;
Expand Down

0 comments on commit 8b1de0b

Please sign in to comment.