Граф коммитов

1314 Коммитов

Автор SHA1 Сообщение Дата
eban 0e1b92874b * lib/mkmf.rb (init_mkmf): add $(topdir) to $LIBPATH if $extmk.
remove adding $(archdir) to $LIBPATH.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-15 12:20:34 +00:00
uema2 b19e36a214 * configure.in, defines.h, dir.c, dir.h, dln.c, error.c,
eval.c, file.c, hash.c, io.c, main.c, missing.c,
      process.c, ruby.c, rubysig.h, signal.c, st.c, util.c, util.h,
      bcc/Makefile.sub, win32/Makefile.sub, win32/win32.h,
      ext/Win32API/Win32API.c, ext/socket/getaddrinfo.c,
      ext/socket/getnameinfo.c, ext/socket/socket.c,
      ext/tcltklib/stubs.c
      : replace "NT" with "_WIN32", add DOSISH_DRIVE_LETTER
* wince/exe.mak : delete \r at the end of lines.
* wince/mswince-ruby17.def : delete rb_obj_become


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-15 03:18:08 +00:00
nobu c476b6e05c * parse.y (dispose_string): dispose String object.
* parse.y (heredoc_restore, here_document): fix memory leak.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-15 02:48:40 +00:00
uema2 009f78761d * wince/sys : add stat.c, stat.h, timeb.c, timeb.h,
types.h, utime.c, utime.h
* wince/dll.mak : object file name changed.
* wince/io.c : add empty dup2().
* wince/io.h : add dup2 definition.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-14 05:27:35 +00:00
eban c79e877836 * ext/dbm/extconf.rb (rb_check): support for GNU dbm 1.8.3.
(-with-dbm-type=gdbm_compat). link against -lgdbm_compat
  and -lgdbm.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-13 17:14:18 +00:00
eban 3d4298a3c4 * ext/dbm/extconf.rb (db_check): check existence of the function
in the specified library before checking it in libc.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-13 14:54:24 +00:00
nobu a35365d96d * parse.y (expr): rescue clause was ignored.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-13 03:35:03 +00:00
eban b60172917f * configure.in (RUBY_PROG_GNU_LD): add $CFLAGS, $CPPFLAGS, $LDFLAGS
to the option of $CC.

* configure.in: set LIBRUBYARG to '-l$(RUBY_SO_NAME)' if the
  target os is cygwin and --disable-shared option is supplied.

* lib/mkmf.rb (init_mkmf): expand config["LIBRUBY"] and
  config["LIBRUBY_A"].  don't link $LIBRUBYARG_STATIC if
  --disable-shared option is supplied.

* configure.in (RUBY_CPPOUTFILE): should be a better message.

* ext/Win32API/extconf.rb: join with a space.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-12 10:21:41 +00:00
matz f744cfd8d7 * re.c (rb_reg_hash): define Regexp#hash to make regexps to be
hash keys.

* re.c (Init_Regexp): define Regexp#eql? (alias to Regexp#==).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-12 09:17:32 +00:00
nobu e6c77e4c4c * marshal.c (r_object0): singleton class instance can't be loaded. (ruby-bugs-ja:PR#366)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-12 07:29:14 +00:00
eban 3d70ef2648 * ext/extmk.rb (create_makefile): -no-undefined -> --no-undefined.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-11 15:12:52 +00:00
matz 2498da0ea0 * io.c (io_read): takes optional second argument to specify a
string to be written.  the string should not be frozen.

* io.c (rb_io_sysread): ditto.

* lib/getoptlong.rb (GetoptLong::Error): provide a common ancestor
  for GetoptLong error classes (RCR#129).

* re.c (rb_reg_copy_object): fixed memory leak.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-11 09:32:41 +00:00
nobu 1b19c063b8 * ext/digest/digest.c (rb_digest_base_copy): renamed "become".
* ext/stringio/stringio.c (strio_copy): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-11 02:31:59 +00:00
akr 9be47132af * pack.c (utf8_limits): fix the limit of 4 bytes UTF-8 sequence.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-10 08:32:54 +00:00
matz 60b2446bea * sprintf.c (rb_f_sprintf): preceding ".." for negative numbers
still left;  removed.

* sprintf.c (rb_f_sprintf): should not prepend '0' if width > prec
  for example "%5.3d".

* process.c (Init_process): add Process.exit and Process.abort

* pack.c (utf8_to_uv): raise ArgumentError for malformed/redundant
  UTF-8 sequences.

* process.c (last_status_set): add pid attribute to Process::Status.

* pack.c (uv_to_utf8): limit maximum length of the encoded string
  to 6 bytes, even when the platform supports 8 bytes long integers.

* pack.c (utf8_to_uv): do not decode sequences longer than 6 bytes.

* object.c (copy_object): use "copy_object" method, not "become".


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-10 06:23:44 +00:00
nobu df8833203e * eval.c (mnew): original class of method defined in module should
be the module not intermediate class.  [ruby-dev:19040]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-10 06:19:21 +00:00
matz a526e3fe02 * object.c (copy_object): copy finalizers as well if any.
* gc.c (rb_gc_copy_finalizer): new function to copy finalizers.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-04 07:39:32 +00:00
akr 96f82b243f * lib/pp.rb (PP.singleline_pp): new method.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3110 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-02 16:16:05 +00:00
matz e193fd8d66 * pack.c (utf8_to_uv): added checks for malformed or redundant
UTF-8 sequences.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-02 07:13:56 +00:00
nobu 96986a7a90 * lib/optparse.rb (OptionParser::new): same as OptionParser#on but
returns new OptionParser::switch.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-01 14:10:51 +00:00
nobu c405dbf692 * win32/win32.c (rb_w32_stat): empty path is invalid, and return
ENOENT rather than EBADF in such case.  [ruby-talk:57177]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-01 13:47:06 +00:00
knu 5d6af6910d * lib/mkmf.rb: Avoid the use of "clean::" in favor of "clean:" in
order not to let make(1) choke if there is another dependency on
  the target added in a depend file.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-28 03:12:23 +00:00
knu ba9627f0da * lib/mkmf.rb: Make sure to dig the destination directory before
installing a file there.  Formerly "make install" could fail
  depending on make(1)'s mood of the moment, especially when -jN
  is given.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-27 17:51:27 +00:00
matz 0cf319ce54 * dln.c (init_funcname_len): remove MAXPATHLEN dependency.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-27 09:11:55 +00:00
knu 34558b71c7 * ext/syslog/syslog.c: Cut redundancy.
* ext/syslog/syslog.c: Do not leak ident.

* ext/syslog/syslog.c, ext/syslog/test.rb: Syslog.close should
  raise RuntimeError when not opened.

* ext/syslog/syslog.c, ext/syslog/test.rb:
  Syslog.{ident,options,facility,mask} should all return nil when
  not opened.

* ext/syslog/syslog.c, ext/syslog/test.rb: Change back the output
  format of inspect().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-27 08:44:04 +00:00
knu ad42685bf4 * ext/syslog/test.rb: Syslog.close should raise RuntimeError when
not opened.

* ext/syslog/test.rb: Syslog.{ident,options,facility,mask} should
  all return nil when not opened.

* ext/syslog/test.rb: Change back the output format of inspect().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-27 08:36:22 +00:00
knu ce0fd8c523 * ext/digest/test.rb: Switch from RUnit to Test::Unit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-27 07:28:45 +00:00
knu 688f0d6c8e * ext/syslog/syslog.c: Fix a problem where Syslog#ident was not
marked and could thus be GC'd.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-27 07:15:37 +00:00
knu 2c463325ae * ext/syslog/test.rb: Switch from RUnit to Test::Unit.
* ext/syslog/test.rb: The output format of inspect() is slightly
  altered.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-27 07:14:00 +00:00
nobu dc9986f447 commit miss
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-26 22:44:44 +00:00
nobu 5bf245eeb9 * error.c (exit_initialize): add SystemExit#initialize to set
instance variable status.  (ruby-bugs-ja:PR#362)
  Now accepts status as optional first argument.

* eval.c (error_handle): now SystemExit have status always.

* eval.c (system_exit): just instantiate SystemExit without raise.

* eval.c (rb_thread_start_0): initialize SystemExit properly.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-26 22:32:11 +00:00
eban ee8addc13f * ext/extmk.rb (extmake): return true if not dynamic and not static.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-25 11:00:03 +00:00
eban 7ceb37d715 typofix.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-24 16:17:56 +00:00
eban a1250adef3 * dln.c: devert and add the MAXPATHLEN definition on mswin32/mingw32.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-24 16:11:53 +00:00
eban 0dcbeda434 * dln.c: move the MAXPATHLEN definition in front.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-24 12:36:01 +00:00
matz 7f62113f4d * sprintf.c (rb_f_sprintf): preceding ".." for negative
hexadecimal numbers should not appear if prec (e.g. %.4) is
  specified.

* pack.c (NUM2I32): support platforms which does not have 32bit
  integers (e.g. Cray).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-22 14:30:33 +00:00
knu 0b2c50f3a7 * instruby.rb: Install batch files on Windows. [Submitted by usa]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-22 10:22:29 +00:00
matz f047de71e6 * eval.c (rb_add_method): node may be NULL.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-22 09:32:50 +00:00
matz e2d384d628 * file.c (rb_find_file_ext): should not terminate searching with
empty path, just ignore.

* dir.c: remove <sys/parm.h> inclusion.

* compar.c (cmp_eq,cmp_gt,cmp_ge,cmp_lt,cmp_le): check using
  rb_cmpint().

* error.c (init_syserr): remove sys_nerr dependency.

* numeric.c (num_cmp): added to satisfy Comparable assumption.

* eval.c (rb_add_method): "initialize" should be public if it is a
  singleton method.

* regex.c (re_match): avoid dereferencing if size == 0.
  (ruby-bugs-ja:PR#360)

* time.c (time_cmp): should return nil if an operand is not a
  number nor time. (ruby-bugs-ja:PR#359)

* file.c (rb_stat_cmp): should return nil if an operand is not
  File::Stat.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-22 09:14:24 +00:00
aamine f80af5150a * lib/net/smtp.rb: changes coding style.
* lib/net/pop.rb: ditto.
* lib/net/protocol.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-21 11:50:09 +00:00
aamine 15911a95bf * lib/net/http.rb: unify coding style.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-21 11:13:17 +00:00
aamine 4a66fdcad3 sorry, conflicts in ChangeLog is now resolved.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-21 11:09:22 +00:00
aamine c157dff026 modify ChangeLog.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-21 11:07:17 +00:00
matz 5315f0d667 * array.c (rb_ary_zip): iterates over items in the receiver.
zipped with nil if argument arrays are shorter.  if arrays are
  longer, left items are ignored.  now works with blocks.

* enum.c (zip_i): changed for new behavior.

* array.c (rb_ary_transpose): added. [new]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-19 08:07:51 +00:00
knu 12e312c5e4 * instruby.rb: Do not install various working files under bin/.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-18 20:16:54 +00:00
nobu c52339881c * instruby.rb: not rewrite installed scripts when dry-run mode.
* lib/ostruct.rb (OpenStruct::initialize): should symbolize keys
  instead of values.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-18 20:09:46 +00:00
knu c15d3e6bff * instruby.rb: Rewrite installed scripts' shebang lines.
* instruby.rb: Use File.join() where appropriate.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-18 17:26:03 +00:00
knu c04ef9321c * bin/irb: Moved from sample/irb.rb.
* instruby.rb: Install script files under bin/ with ruby's program
  prefix and suffix.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-18 16:57:36 +00:00
knu 34413718ac * lib/tempfile.rb: Make this libary thread safe.
* lib/tempfile.rb: Do not pick a name which was once used and is
  still scheduled for removal.

* lib/tempfile.rb: A lock file need not and must not be scheduled
  for removal.

* lib/tempfile.rb: Compare Max_try with the number of mkdir
  failures instead of the suffix counter.

* lib/tempfile.rb: Overall cleanup and add some important notices.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-17 18:01:17 +00:00
nobu f87abaadcc * parse.y (dsym): garbage returned. (ruby-bugs-ja:PR#358)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3048 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-17 14:01:57 +00:00