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

1443 Коммитов

Автор SHA1 Сообщение Дата
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
nahi 3491b8a2ca * profile.rb: illegal use of Array#sort!. replaced it with non-bang
method.  [ruby-dev:18792]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-14 22:58:42 +00:00
nahi c0e98a1384 * observer.rb: raise NoMethodError instead of NameError. [ruby-dev:18788]
* ostruct.rb: ditto.  fix a bug in inspect which called String#+ with
  Symbol.  [ruby-dev:18788]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-14 22:46:00 +00:00
nobu 604689628d * configure.in (LIBRUBY_A): append -static. [ruby-dev:18689]
* configure.in (LIBRUBYARG_STATIC, LIBRUBYARG_SHARED): linker
  argument to link static/shared library respectively.

* Makefile.in (LIBRUBYARG_STATIC, LIBRUBYARG_SHARED): added.

* bcc32/Makefile.sub, win32/Makefile.sub: ditto.

* instruby.rb (LIBRUBY_A): install to libdir.

* lib/mkmf.rb (link_command): link static library of ruby, or
  try_run fails unless LIBRUBY_SO is installed.  [ruby-dev:18646]

* eval.c (call_trace_func): toplevel caller was missing.
  [ruby-dev:18754]

* eval.c (proc_to_s): adjust created line number.

* parse.y (primary, do_block, brace_block): adjust line number of
  block to beginning line, instead of the first statement inside
  the block.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-14 13:51:19 +00:00
matz a1c02ee495 * math.c (math_acos): check errno after operation. ditto for
asin, acosh, atanh, log, log10 and sqrt.

* eval.c (rb_add_method): initialize should always be private.

* parse.y (expr): add rescue modifier rule.

* parse.y (command_call): return, break and next with argument is
  now part of this rule.

* parse.y (yylex): "a" in "a /5" should be considered as a local
  variable. [experimental]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-14 06:18:59 +00:00
nobu 8699e3e525 * configure.in (DLDFLAGS): removed -Wl,-no-undefined to
ext/extmk.rb, in order to allow references to symbols in other
	  extension libraries for mkmf.rb.  [ruby-dev:18724]

	* ext/extmk.rb (extmake): ditto.

	* ext/extmk.rb (extmake): exit when make failed.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-13 07:30:24 +00:00
knu 2cfae9b60f * lib/set.rb: retire contain?() and add superset?(),
proper_superset?() subset?(), and proper_subset?().
  [obtained from: Jason Voegele's set.rb]

* lib/set.rb: define several aliases: union() for |(),
  difference() for -(), ande intersection() for &().
  [obtained from: Jason Voegele's set.rb]

* lib/set.rb: deal with a s/id/object_id/ leftover.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-09 18:52:04 +00:00
eban 977bf97db3 * ext/tcltklib/stubs.c: should include "util.h" for ruby_strdup.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-09 08:05:27 +00:00
nahi ba565bd6b3 * eval.c: remove ENABLE_TRACE/DISABLE_TRACE to trace child nodes of c-call.
[ruby-dev:18699]; nahi commits this as proxy for nobu.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-09 02:52:55 +00:00
matz 54fdacb125 * class.c (rb_define_method): do not set NOEX_CFUNC if klass is
really a module, whose methods must be safe for reciever's type.

* eval.c (rb_eval): nosuper should not be inherited unless the
  overwritten method is an undef placeholder.

* parse.y (primary): allow 'when'-less case statement; persuaded
  by Sean Chittenden.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3032 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-07 19:18:16 +00:00
nobu 2b82367a47 * eval.c (rb_yield_0): should enable trace for non-cfunc nodes.
[ruby-dev:18645]

* eval.c (blk_orphan): a block created in a different thread is
  orphan.  [ruby-dev:17471]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-07 01:03:08 +00:00
knu 0d572fc9b7 * ext/extmk.rb: Properly pass the given target to
make(1). [pointed out by eban]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-04 15:47:35 +00:00
usa cf1575f17d * instruby.rb, lib/mkmf.rb: use CONFIG["ENABLE_SHARED"] instead of
checking whether CONFIG["configure-args"] includes "--enable-shared".


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-04 11:06:03 +00:00
knu cdce29bf0f * Makefile.in, ext/extmk.rb, bcc32/Makefile.sub,
win32/Makefile.sub: Introduce better command line syntax
  (--make/--make-flags/--extstatic) to extmk.rb and instruby.rb.
  Previously such command as 'make -j3 install' with pmake doesn't
  fail.  Formerly extmk.rb was receiving "make -j 3 -j 3" via the
  command line arguments and just ended up recognizing the first
  "3" as destdir. [with help of usa]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-03 21:42:14 +00:00
knu db9126b073 * lib/getopts.rb: Do not choke on characters that cannot be used
in a variable name.  Replace them with `_'.  Define a hash named
  $OPT for convenience.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-03 19:05:33 +00:00
matz aae36756dc * object.c (Init_Object): added Object#object_id, new name for
Object#id. [new]

* object.c (rb_obj_id_obsolete): give warning for Object#id.

* numeric.c (fix_intern): added Fixnum#to_sym. [new]

* object.c (sym_to_sym): rename from Symbol#intern

* enum.c (enum_zip): added Enumerable#zip. [new]

* array.c (rb_ary_zip): added Array#zip.

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


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-03 11:04:35 +00:00
matz ed18815109 * eval.c (rb_mod_public_method_defined, etc.): new methods:
public_method_defined?, private_method_defined?,
  protected_method_defined?

* object.c (rb_obj_public_methods): new method
  Object#public_methods.

* class.c (ins_methods_i): Object#methods should list both public
  and protected methods.

* class.c (rb_class_public_instance_methods): new method
  Module#public_instance_methods.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-30 08:04:32 +00:00
knu a2868ff651 * eval.c, file.c, gc.c, io.c, object.c, ruby.c, ruby.h, struct.c,
ext/socket/socket.c: differentiate long and int; use proper
  printf type specifiers and do casts where appropriate.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-29 21:35:28 +00:00
nobu 088276ac84 * eval.c (error_print, rb_longjmp, rb_thread_schedule): flush
error message.  [ruby-dev:18582]

	* eval.c (ruby_cleanup): added.  just clean up without exit.
	  [ruby-dev:18582]

	* eval.c (ruby_exec): added.  execute main evaluation tree without
	  exit.  [ruby-dev:18582]

	* intern.h: prototypes; ruby_cleanup, ruby_exec


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-29 19:11:17 +00:00
nobu 97eafefb4a * ext/extmk.rb (extmake): use dummy_makefile to create dummy
Makefile.

* lib/mkmf.rb (find_executable0): EXEEXT is optional.

* lib/mkmf.rb (dummy_makefile): make dummy Makefile content.

* lib/mkmf.rb (create_makefile): define EXTLIB replacing -l.

* lib/mkmf.rb ($bccwin): detect Borland make by help message.

* lib/mkmf.rb (CLEANINGS): common rules to clean.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-28 17:01:23 +00:00
eban e51578fd72 * djgpp/config.sed (@program_transform_name@): use `%', not `,'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-27 16:32:26 +00:00
eban c2ea598cf5 ChangeLog: commit miss.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-27 15:13:34 +00:00
H_Konishi ccfb459b7d ext/extmk.rb(78) : The unnecessary error when installing by bccwin32 is controlled.
lib/mkmf.rb(773) : Also in the case of bccwin32, the path was added.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-27 14:05:25 +00:00
knu 20a8fa174c * node.h (nd_type): cast the value to int.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-26 15:51:59 +00:00
knu 9e4cfb5da4 * ext/dbm/dbm.c (fdbm_indexes, fdbm_select): add a missing
argument and prevent coredump when a nonexistent key is
  specified.

* ext/sdbm/init.c (fsdbm_indexes, fsdbm_select): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-25 19:31:55 +00:00
knu 3da9449263 * eval.c, gc.c: adopt a common set of alloca() #ifdef's. This
fixes the build with Intel C Compiler for Linux.

* eval.c (rb_f_require): declare old_func with a real type, not
  just type modifiers.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-25 18:39:30 +00:00
aamine 057f1f3020 * ChangeLog: add ML ref.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-24 18:23:52 +00:00
aamine 42e292ae33 * string.c (rb_str_split_m): RSTRING(str)->ptr might become NULL.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-24 17:54:53 +00:00
nobu d45f226da9 * configure.in (LIBPATHFLAG): avoid $ substitution.
[ruby-dev:18577]

* ext/extmk.rb (extmake): expand $srcdir.

* ext/win32ole/extconf.rb: should not override $CFLAGS, but
  append.

* lib/mkmf.rb (config_string): use given config hash.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-24 12:58:42 +00:00
nobu 9c33e18ca0 * bcc32/Makefile.sub (.rc.res): directory part may be empty in Borland make.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-24 05:31:25 +00:00
nobu 709c9e1cb5 * lib/mkmf.rb (create_makefile): site-install target for backward compatibility.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-23 18:52:29 +00:00
nobu 236323b77c * lib/mkmf.rb (init_mkmf): libdir prior to topdir.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-23 18:21:54 +00:00
nobu 6009002c58 * configure.in (LIBPATHFLAG): should escape $. [ruby-dev:18572]
* mkconfig.rb: never substute escaped $$.

* instruby.rb: not install LIBRUBY_SO unless enable-shared.
  [ruby-dev:18569]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-23 17:40:36 +00:00
nobu d4f2f6a7f7 * eval.c (rb_eval): added NODE_DSYM, symbol literal with
interpolation.

* node.h: ditto.

* intern.h: prototypes; rb_is_junk_id, rb_str_dump, rb_str_intern

* object.c (sym_inspect): escape and quote for non-alphanumeric
  symbols.

* parse.y (dsym, tokadd_string, yylex): extended symbol literals.

* parse.y (rb_is_junk_id): added.

* string.c (rb_str_dump, rb_str_intern) : make extern.

* lib/mkmf.rb (create_makefile): deffile should be removed by
  distclean, not clean.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-23 10:17:30 +00:00
eban d66da40534 * lib/mkmf.rb (init_mkmf): add dir_config("opt").
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-22 14:58:59 +00:00
H_Konishi 57a6839081 *bcc32/configure.bat : The command line when calling setup.mak is corrected.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-22 10:54:11 +00:00
nobu 6073c68242 * ext/extmk.rb (extmake): add install: target to dummy Makefile.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-22 06:24:19 +00:00
nobu db1c27bb37 * instruby.rb: add dryrun mode.
* ext/extmk.rb (extmake): avoid Borland make's quirk behavior.

* lib/mkmf.rb (link_command): opt is not a makefile macro.

* bcc32/Makefile.sub ($(LIBRUBY_SO) $(LIBRUBY)): EXTOBJS were not
  linked.

* bcc32/Makefile.sub (ext/extinit.obj): missing.

* bcc32/Makefile.sub (TRY_LINK): options have to place before any
  non-option arguments.

* win32/Makefile.sub (TRY_LINK): need -link and -libpath options.

* bcc32/Makefile.sub, win32/Makefile.sub (RANLIB): logical
  operator never work with command.com.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-22 04:19:26 +00:00
eban 79c8b98fac * configure.in (RUBY_CPPOUTFILE): fix cache file bug.
* lib/mkmf.rb (link_command): put 'opt' after conftest.c for
  static linking.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-21 16:09:09 +00:00
nobu b9ecdfaa3d * configure.in (XCFLAGS): CFLAGS to comile ruby itself.
* configure.in (LIBEXT): suffix for static libraries.

* configure.in (LIBPATHFLAG): switch template to specify library
  path.

* configure.in (LINK_SO): command to link shared objects.

* configure.in (DEFFILE, ARCHFILE): miscellaneous system dependent
  files.

* configure.in (EXPORT_PREFIX): prefix to exported symbols on
  Windows.

* configure.in (COMMON_LIBS, COMMON_MACROS, COMMON_HEADERS):
  libraries, macros and headers used in common.

* configure.in (RUBYW_INSTALL_NAME, rubyw_install_name): GUI mode
  excutable name.

* Makefile.in (CFLAGS): append XCFLAGS.

* Makefile.in (PREP): miscellaneous system dependent files.

* Makefile.in (ruby.imp, ext/extinit.o): moved from ext/extmk.rb.

* Makefile.in (fake.rb): CROSS_COMPILING keeps building platform.

* Makefile.in (MAKEFILES): depend on *.in and config.status.

* Makefile.in (parse.c): replace "y.tab.c" with actual name for
  byacc.

* ext/extmk.rb, lib/mkmf.rb: integrated.

* ext/extmk.rb: propagate MFLAGS.

* ext/extmk.rb (extmake): make dummy Makefile to clean even if no
  Makefile is made.

* lib/mkmf.rb (older): accept multiple file names and Time
  objects.

* lib/mkmf.rb (xsystem): split and qoute.

* lib/mkmf.rb (cpp_include): make include directives.

* lib/mkmf.rb (try_func): try wheather specified function is
  available.

* lib/mkmf.rb (install_files): default to site-install.

* lib/mkmf.rb (checking_for): added.

* lib/mkmf.rb (find_executable0): just find executable file with
  no message.

* lib/mkmf.rb (create_header): output header file is variable.

* lib/mkmf.rb (create_makefile): separate sections.

* lib/mkmf.rb (init_mkmf): initialize global variables.

* win32/Makefile.sub, bcc32/Makefile.sub (CPP, AR): added.

* bcc32/Makefile.sub (ARCH): fixed to i386.

* win32/Makefile.sub, bcc32/Makefile.sub (miniruby): should not
  link EXTOBJS.

* ext/dl/extconf.rb: use try_cpp to cross compile.

* ext/dl/extconf.rb: not modify files in source directory.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-21 14:17:44 +00:00
nobu 8232622071 * parse.y (value_expr0): allow return/break/next/redo/retry in rhs
of logical operator.  [ruby-dev:18534]

* parse.y (remove_begin): eliminate useless NODE_BEGIN.
  [ruby-dev:18535]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-18 14:13:41 +00:00
knu 6dfb5aa6ac * hash.c, eval.c: Use (*_NSGetEnviron()) instead of environ on
Darwin for namespace cleanness.  [ruby-core:00537]

* dln.c (dln_load): Fix Darwin support that has been disabled and
  switch to using it on Darwin instead of the system dlopen().
  [ruby-core:00541]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-17 16:13:44 +00:00
nobu 020caa3fc8 * marshal.c (w_byten): added; write n bytes from s to arg.
* marshal.c (dump): flush buffered data.

* marshal.c (marshal_dump, r_byte, r_bytes0, marshal_load): unify
  marshaling I/O.  [ruby-talk:53368]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-17 10:20:52 +00:00
matz 66d1582c07 * object.c (rb_str_to_dbl): RString ptr might be NULL.
* object.c (rb_cstr_to_dbl): p pointer might be NULL.

* bignum.c (rb_str_to_inum): RString ptr might be NULL.

* bignum.c (rb_cstr_to_inum): str pointer might be NULL.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-17 07:27:00 +00:00
aamine e6c0ea3e09 * lib/fileutils.rb: stat.blksize might become 0/nil.
* lib/fileutils.rb: change coding style.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-17 06:24:42 +00:00
nobu 67f14c022b * sprintf.c (rb_f_sprintf): disallow mixed usage of numbered and
unnumbered arguments.  [ruby-dev:18531]
  get rid of memory leak at exception.  [ruby-core:00460]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-16 13:44:19 +00:00
nobu 2ba2dba5be * variable.c (rb_global_entry): not add global entry until
initialized to avoid accessing it while GC.  [ruby-dev:18514]

* variable.c (rb_alias_variable): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-16 04:43:28 +00:00
nobu 1de50c518b * win32/win32.c (rb_w32_putc): wrong condition to fill or flush on
bccwin32.  [ruby-win32:408]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-12 14:47:07 +00:00
nobu 31ab445fea * win32/win32.c (rb_w32_fclose, rb_w32_close): use closesocket()
for socket.  [ruby-win32:382]

* win32/win32.c (StartSockets): set NtSocketsInitialized.

* win32/win32.h: prototypes; rb_w32_fclose, rb_w32_close


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-10 21:07:16 +00:00
nobu 4cdd83f686 * gc.c (ruby_xmalloc, ruby_xrealloc): restrict total allocation
size according to memories consumed by live objects.
  [ruby-dev:18482]

* gc.c (gc_sweep): estimate how live objects consume memories.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-10 15:26:58 +00:00
eban 129d05ae8d * ext/tcltklib/stubs.c (ruby_tcltk_stubs): fix memory leak.
[ruby-dev:18478]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-10 08:30:52 +00:00
nobu 99ebeaee0a * lib/weakref.rb (WeakRef::@@final): use Hash#delete.
* lib/weakref.rb (WeakRef::__getobj__): examin if alive or not by
  ID_REV_MAP to deal with recycled object.  [ruby-dev:18472]

* lib/weakref.rb (WeakRef::weakref_alive?): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-10 07:00:07 +00:00
nobu ca7549b203 * gc.c (gc_sweep): also adjust heaps_limits when free unused heap
page.  [ruby-core:00526]

* io.c (io_fflush): condition to retry can occur.

* io.c (io_write): returned 0 wrongly if no error occurred.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-09 06:12:54 +00:00
nobu 00882bfe35 * io.c (io_write): must check returned value from fwrite() before
test with ferror().  (ruby-bugs-ja:PR#350)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-08 05:34:45 +00:00
akr e2d1e7cfe4 * lib/prettyprint.rb (PrettyPrint.singleline_format): new method.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-08 01:58:34 +00:00
matz df2d56c03f * bignum.c (bigdivrem): bignum zero's len should not be 0.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-07 07:44:18 +00:00
matz 7da40cbcb8 * bignum.c (bigdivmod): wrong condition check for Bignum zero.
* bignum.c (Init_Bignum): need to add Bignum#div.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2941 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-07 07:16:12 +00:00
aamine 0944a05fb9 * eval.c (rb_load): should not pass block to the loaded file.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-05 15:46:24 +00:00
matz a2c9020808 * bignum.c (rb_big_rshift): num should be initialized by carry
bits if x is negative.

* bignum.c (bigdivmod): len for bignum zero is 1, not 0.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-04 17:54:29 +00:00
nobu 1e3062ede1 * eval.c (rb_thread_interrupt, rb_thread_signal_raise): no need to
save dead thread context. (same as [ruby-dev:18322])
  (ruby-bugs-ja:PR#349)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2935 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-04 11:32:16 +00:00
eban 5c57848093 * configure.in (RUBY_PROG_GNU_LD): check whether the linker is GNU ld.
* ext/extmk.rb (create_makefile): add -Wl,-no-undefined to $DLDFLAGS
  on Linux if GNU ld is used and --enable-shared is specified.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-04 05:18:05 +00:00
nobu e6bb432c83 * gc.c (Init_stack): prefer address of argument rather than local
variable to initialize rb_gc_stack_start.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-03 11:24:24 +00:00
nobu 4b6dffad02 * bcc32/mkexports.rb: to work on cygwin via telnet.
[ruby-win32:358]

* ext/tcltklib/tcltklib.c (ip_invoke): requires command name
  argument.  [ruby-dev:18438]

* eval.c (ruby_init, ruby_options): Init_stack() with local
  location.  (ruby-bugs-ja:PR#277)

* eval.c (rb_call0): disable trace call.  [ruby-dev:18074]

* eval.c (eval, rb_load): enable trace call.  [ruby-dev:18074]

* eval.c (rb_f_require): set source file name for extension
  libraries.  [ruby-dev:18445]

* ruby.c (translate_char): translate a character in a string;
  DOSISH only.  [ruby-dev:18274]

* ruby.c (ruby_init_loadpath): added argv[0] handling under
  Human68K.  [ruby-dev:18274]

* ruby.c (proc_options): translate directory separator in $0 to
  '/'.  [ruby-dev:18274]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-03 11:20:31 +00:00
nobu 38db4d23c5 (_o_)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-02 15:34:09 +00:00
nobu 55af6c2f96 * lib/delegate.rb (Delegator::initialize): use Object#class
instead of deprecated Object#type.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-02 15:32:45 +00:00
nobu 3a76a40196 * configure.in (RUBY_CHECK_IO_NEED_FLUSH): check whether fflush()
is needed.

* io.c (flush_before_seek): flush before seek if buffered data
  may remain.

* io.c (rb_io_check_readable): flush if the last operation was
  write.

* io.c (rb_io_check_writable): flush if the last operation was
  read.

* rubyio.h (FMODE_RBUF): added.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-02 14:59:25 +00:00
nobu 71c41cf5a5 * io.c (rb_io_wait_readable): handle retryable errors.
* io.c (rb_io_wait_writable): ditto.

* ext/socket/socket.c (bsock_send): ditto.

* ext/socket/socket.c (s_recvfrom): ditto.

* ext/socket/socket.c (s_accept): ditto.

* ext/socket/socket.c (udp_send): ditto.

* ext/socket/getaddrinfo.c (afdl): made private structures constant.

* rubyio.h: prototype; rb_io_wait_readable(), rb_io_wait_writable().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-02 14:13:58 +00:00
matz 8c0cbb7350 * gc.c (gc_sweep): free unused heap page to reduce process size if
possible.

* object.c (rb_obj_type): deperecated Object#type; use Object#class.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-02 05:58:52 +00:00
eban 06886efa95 * configure.in: set ac_cv_func_setitimer to "no" on Cygwin.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-02 04:28:01 +00:00
nobu c691d09dc1 * ext/socket/socket.c (init_sock): no need for special finalizer,
socket descriptor is no longer duplicated in 1.7.
	  [ruby-talk:50732]

	* win32/win32.c, win32/win32.h (rb_w32_fddup, rb_w32_fdclose):
	  delete.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-01 15:26:39 +00:00
matz 734506e96d * range.c (range_check): need no Fixnum check.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-30 11:59:37 +00:00
nobu 7627d0cea7 2002-09-30
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-30 11:35:40 +00:00
nobu a7a8ea12da * io.c (rb_io_inspect): not need to raise IOError for closed stream. [ruby-talk:51871]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-30 11:31:28 +00:00
nobu 7345d0efd4 * win32/win32.c (rb_w32_open_osfhandle): adjust
rb_w32_open_osfhandle() with _open_osfhandle().

* win32/win32.c (rb_w32_accept, rb_w32_socket): return -1 on
  error.

* win32/win32.h: should use file descriptor instead of SOCKET.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2908 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-29 09:31:58 +00:00
usa 62280094cd * win32/win32.c (is_socket, rb_w32_select, rb_w32_accept, rb_w32_bind,
rb_w32_connect, rb_w32_getpeername, rb_w32_getsockname,
  rb_w32_getsockopt, rb_w32_ioctlsocket, rb_w32_listen, rb_w32_recv,
  rb_w32_recvfrom, rb_w32_send, rb_w32_sendto, rb_w32_setsockopt,
  rb_w32_shutdown, rb_w32_socket, rb_w32_gethostbyaddr,
  rb_w32_gethostbyname, rb_w32_gethostname, rb_w32_getprotobyname,
  rb_w32_getprotobynumber, rb_w32_getservbyname, rb_w32_getservbyport):
  need to protect WSAGetLastError() by RUBY_CRITICAL. [ruby-talk:51778]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-28 21:39:57 +00:00
nobu 1577424bdf * keywords: add braces around initializers.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-28 11:08:59 +00:00
nobu 4d23d9e7d8 * hash.c (rb_hash_become): should check self-assignment after
conversion.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-28 04:21:31 +00:00
matz 70dc199fdd * hash.c (rb_hash_become): Hash#become should check added
self-assignment.

* class.c (rb_make_metaclass): metaclass of a superclass may be
  NULL at boot time.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-28 02:41:05 +00:00
H_Konishi 56201383cd * ext/extmk.rb: The condition judgment without necessity was deleted.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-28 00:53:05 +00:00
nobu cfeb0c30c4 * eval.c (rb_thread_deadlock, rb_thread_schedule, rb_thread_join): more verbose message at deadlock.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-27 09:42:24 +00:00
matz af181db784 * eval.c (rb_eval): Class#inherited should be called after the
execution of the class body.

* parse.y (primary): remove "return outside of method" check at
  compile time.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-27 04:26:21 +00:00
knu 7a6adb8924 * ext/digest/sha1: Use OpenSSL's SHA1 engine if available. It is
much faster than what we have now (sha1.[ch]).  Add a knob
  (--with-bundled-sha1) to extconf.rb which makes it use the
  bundled one anyway.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-26 17:44:33 +00:00
knu 15d643f44c * ext/digest/rmd160: Use OpenSSL's RMD160 engine if available. It
is much faster than what we have now (rmd160.[ch]).  Add a knob
  (--with-bundled-rmd160) to extconf.rb which makes it use the
  bundled one anyway.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-26 17:26:46 +00:00
knu 965393cbb8 * ext/digest/md5: Use OpenSSL's MD5 engine if available. It is
much faster than what we have now (md5.[ch]).  Add a knob
  (--with-bundled-md5) to extconf.rb which makes it use the
  bundled one anyway.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-26 16:27:23 +00:00
knu b00af5f83a * ext/digest/digest.c (rb_digest_base_s_digest): Fix a double
free() bug mingled with allocation framework deployment.

* ext/digest/digest.c (rb_digest_base_s_hexdigest): Get rid of
  redundant struct allocation.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-26 13:49:40 +00:00
matz 7c4d1fe5e0 * regex.c (re_match): p1 may exceed pend limit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-26 00:48:33 +00:00
nobu 12852c2e9a * dir.c (glob_helper): must not closedir() when exception raised
while globbing "**".

* marshal.c (w_uclass): unused variable.

* re.c (match_clone): unused.

* regex.c (re_compile_pattern): get rid of implicit promotion from
  plain char to int.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-25 14:52:37 +00:00
usa 44b2f1609c * lib/mkmf.rb (libpathflag): restore ENV['LIB'] when some error occured.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-25 08:49:17 +00:00
matz 4b9a7eac05 * io.c (appendline): forget to terminate with nul.
* eval.c (ruby_run): should set toplevel visibility again here.

* eval.c (rb_eval): should not rely on ruby_class == rb_cObject
  check.   Besides allow implicit publicity for attribute set
  methods.

* parse.y (primary): need not to check class_nest, just set
  whether method is an attrset or not.

* string.c (rb_str_each_line): p might be at the top of the
  string.

* class.c (rb_make_metaclass): class of metaclass should be
  metaclass of superclass, unless class itself is a metaclass;
  class of metaclass of metaclass should point back to self.
  eh, confusing, isn't it.

* class.c (rb_singleton_class): check if its class is singleton
  AND attached to self.

* eval.c (rb_eval): should define class/module under ruby_cbase.

* eval.c (rb_eval): should set class/module path based on
  ruby_cbase, not ruby_class.

* eval.c (module_setup): use ruby_cbase instead of ruby_class.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-25 07:03:05 +00:00
nobu 53178fc7db * eval.c (rb_call0): must not clear ruby_current_node, or
backtrace cannot be genetated.

* intern.h (ruby_yyparse): rather than yyparse().

* parse.y (yylex): nextc() returns -1 at end of input, not 0.

* parse.y (newline_node): reduce deplicated newline node.

* parse.y (literal_concat): get rid of warning.

* parse.y (new_evstr): fixed junk code.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-23 15:48:42 +00:00
eban 849b1000b0 * configure.in (RUBY_MINGW32): new macro. check for the MinGW
compiler envionment.
* lib/mkmf.rb: refactoring.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-23 11:01:49 +00:00
nobu 742283385f * eval.c (call_trace_func): should not call trace function while
compilation.

* eval.c (rb_call0): also inside c-func.

* parse.y (yycompile): ditto.

* ruby.c (require_libraries): preserve source file/line for each
  require.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-22 12:52:18 +00:00
nobu f3cdd50125 commit miss
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-21 13:30:48 +00:00
nobu 5c6ede680b * eval.c (rb_thread_raise): no need to save dead thread context.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-21 13:30:00 +00:00
nobu 749dea9e7c * parse.y (block_append): eliminate unused literal nodes.
* parse.y (literal_concat): refined literal concatination.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-20 14:03:45 +00:00
knu f5b9282f05 * lib/set.rb: Merge rough/lib/set.rb rev.1.5-1.15.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-20 10:46:52 +00:00
nobu 9d29825355 * eval.c (rb_thread_die): put thread dead state.
* eval.c (rb_thread_atfork): free stack buffer at fork too.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-17 12:07:36 +00:00
matz 73a47246f2 * eval.c (rb_mod_nesting): load wrapping module should appear in
Module#nesting list. (ruby-bugs-ja:PR#328)

* eval.c (rb_thread_remove): free stack buffer on remove.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-17 09:36:05 +00:00
aamine 50cc115b7e * io.c: add parameter prototype.
* re.c: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-16 15:56:31 +00:00
H_Konishi 94e5dc3416 * win32/win32.c (rb_w32_opendir): Corresponds to the unjust path containing ".
(rb_w32_stat) : ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-15 13:02:09 +00:00
eban ce296ec7fc * configure.in (OUTFLAG, CPPOUTFILE): moved from lib/mkmf.rb.
check whether ${CPP} accepts the -o option.
* win32/Makefile.sub (OUTFLAG, CPPOUTFILE): ditto.
* bcc32/Makefile.sub (OUTFLAG, CPPOUTFILE): ditto.
* djgpp/config.sed (OUTFLAG, CPPOUTFILE): ditto.
* lib/mkmf.rb (OUTFLAG, CPPOUTFILE): use CONFIG.
  make easy to understand log.
* mkconfig.rb (val): should not strip.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-15 12:57:21 +00:00
H_Konishi aa904b2050 * error.c(rb_sys_fail): remove case EPIPE on bcc32 .
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-14 11:17:32 +00:00
nobu a1ea7b6d56 * dir.c (glob_func_caller): add prototype to get rid of warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-13 14:46:44 +00:00
nobu 026e185838 * eval.c (rb_eval): avoid uninitialized global/class variable
warnings at `||='.  [ruby-dev:18278]

* parse.y (stmt, arg): ditto


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-13 09:36:28 +00:00
eban 8b598af611 * lib/mkmf.rb ($INSTALLFILES): avoid warning when $VERBOSE mode.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-13 04:30:27 +00:00
H_Konishi df3368c1dd * bcc32/setup.mak : Control of a message.
* bcc32/makefile.sub : include resource.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-12 14:27:02 +00:00
nobu 66d9f5498b * dir.c (glob_helper): should pass matched path. (ruby-bugs-ja:PR#333)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-12 09:11:12 +00:00
nobu 563885cad6 * dir.c (glob_helper): fixed freeing buffer. (ruby-bugs-ja:PR#332)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-12 08:48:57 +00:00
matz b031fdbc0e * dir.c (glob_helper): prevent memory leak using rb_protect().
* string.c (rb_str_associate): no need to check freeze flag.

* string.c (rb_str_resize): should honor STR_ASSOC flag on
  resize.

* string.c (rb_str_resize): proper STR_ASSOC handling.  pointed
  out by Michal Rokos.

* string.c (rb_str_buf_cat): ditto.

* string.c (rb_str_cat): ditto.

* string.c (rb_str_buf_append): ditto.

* string.c (rb_str_append): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-12 06:27:15 +00:00
nobu 368e015170 * eval.c (rb_trap_eval): preserve thread status and so on.
[ruby-talk:40337], [ruby-core:00019]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-11 15:13:10 +00:00
akr c47f24027a * pp.rb (ARGF.pretty_print): implemented.
(PP.pp): arguments reordered.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-11 12:29:17 +00:00
nobu bfb1775244 * eval.c (proc_to_s): refined format. [ruby-dev:18215]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-11 09:58:02 +00:00
usa d0c6f63804 * win32/win32.c, win32/win32.h (rb_w32_getpid): negate pid under Win9x.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-11 08:50:13 +00:00
knu b9e3aa30f7 * string.c (get_pat): Add an extra argument "quote".
* string.c (rb_str_match_m): Do not bother to convert if a regexp
  is given.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-11 04:05:36 +00:00
usa 0eb196f281 * bcc32/Makefile.sub: remove unnecessary `.dll' from filename of
dll's resource file.

* cygwin/GNUmakefile.in: ditto. [ruby-dev:17103]

* win32/Makefile.sub: ditto. [ruby-dev:17103]

* win32/resource.rb: ditto. [ruby-dev:17103]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-11 02:38:51 +00:00
nobu f34534c52a retry on EINTR, ERESTART and EWOULDBLOCK. [ruby-dev:17855], [ruby-dev:17878], [ruby-core:00444]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2841 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-11 01:09:04 +00:00
usa a82da9463f * win32/Makefile.sub (ext): make directory `ext' on compile dir.
[ruby-dev:18255]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-11 00:39:35 +00:00
nobu bb34d7163d * eval.c (rb_mod_define_method): initialize orig_func too.
(ruby-bugs-ja:PR#330)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-10 15:44:36 +00:00
nobu 64bdb0c395 * parse.y (nextc): restore line number after here documents.
(ruby-bugs-ja:PR#331)

* parse.y (heredoc_restore): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-10 14:38:20 +00:00
eban d54331b0af * ext/extmk.rb, lib/mkmf.rb ($INCFLAGS): new var for -I$(topdir).
* lib/mkmf.rb: add #define WIN32_LEAN_AND_MEAN to improve compile
  times.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-10 09:30:50 +00:00
usa 97c0e2c0cd * ChangeLog: specify the source.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-10 08:28:51 +00:00
usa a3faa7e2e2 * win32/Makefile.sub (miniruby): shouldn't link $(EXTOBJS).
* win32/Makefile.sub ($(LIBRUBY_A), $(LIBRUBY)): avoid lib.exe's
  warning.

* win32/Makefile.sub: remove unnecessary rules.

* win32/configure.bat, win32/setup.mak, win32/README.win32: enable to
  pass some arguments to configure.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-10 08:24:11 +00:00
eban b3a426e70a * win32/win32.h (S_I?USR): define only if not mingw32.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-09 14:48:21 +00:00
nobu 23fb79a290 * ext/stringio/stringio.c (strio_set_string): reinitialize
properly.

* ext/stringio/stringio.c (strio_become): added self-assign check
  and experimental auto-conversion to StringIO.

* ext/stringio/stringio.c (strio_reopen): added.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-09 02:27:01 +00:00
eban 73d4f4b0bb * time.c (time_free): prototype; struct time_object -> void *.
avoid GCC warnings.
* lib/mkmf.rb, ext/extmk.rb ($LINK, $CPP): move to lib/mkmf.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-08 12:59:08 +00:00
usa 43241ab269 * ext/tcltklib/tcltklib.c: prototype; invoke_queue_handler() to avoid
VC++ warning.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-08 10:33:12 +00:00
usa d1a4bf7d3a * time.c: prototype; time_free() to avoid VC++ warnings.
* win32/win32.c (rb_w32_stat): remove S_IWGRP and S_IWOTH bits from
  st_mode.

* win32/win32.h (S_I*): define if not defined.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-08 10:06:40 +00:00
eban b8ff4a843e * lib/mkmf.rb (have_struct_member): moved from ext/socket/extconf.rb.
* ext/socket/extconf.rb: use macro_defined? instead of egrep_cpp.
* ext/etc/extconf.rb: use have_struct_member.
* ext/etc/etc.c: add prefix HAVE_ST_ to PW_ macros.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-08 10:00:43 +00:00
eban 4f26f3b890 * configure.in: modify program_prefix only if specified
--program-prefix.

* configure.in: don't generate ext/extmk.rb.

* Makefile.in: execute directly $(srcdir)/ext/extmk.rb.
  remove -Cext option, "Dir::chdir 'ext'" in ext/extmk.rb.

* {win32,bccwin32}/Makefile.sub: ditto.

* instruby.rb: ditto.

* ext/extmk.rb: renamed from ext/extmk.rb.in.

* lib/mkmf.rb (module Logging): create log files (mkmf.log)
  in each extension module directories.

* ext/extmk.rb: ditto.

* lib/mkmf.rb (macro_defined?): new method.

* ext/.cvsignore: remove extmk.rb.

* ext/*/.cvsignore: add "*.def".


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-08 09:08:15 +00:00
H_Konishi 275d1a12e6 bcc32/configure.bat : Control of a message.
bcc32/makefile.sub  : @(sitearch) typo.
ext/extmk.rb.in     : [bccwin32] libdir is added to a library path.
lib/mkmf.rb         : ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-08 05:46:29 +00:00
nobu 75821a5afb * misc/inf-ruby.el (inferior-ruby-error-regexp-alist): regexp
alist for error message from ruby.

* misc/inf-ruby.el (inferior-ruby-mode): fixed for Emacs.

* misc/inf-ruby.el (ruby-send-region): compilation-parse-errors
  doesn't parse first line, so insert separators before each
  evaluations.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-07 14:37:26 +00:00
knu d29143b99e * lib/set.rb: Disallow Set.new(false). Add even more tests.
[Submitted by: "Christoph" <chr_news@gmx.net>]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-07 10:48:14 +00:00
knu 6954ba398a * lib/set.rb: Fix a bug in flatten()'s recursive set detection.
[Submitted by: "Christoph" <chr_news@gmx.net>]  Some tests
  against the bug are added.

* lib/set.rb: Resurrect the test suite by putting it after
  __END__ and executing `eval DATA.read'.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-07 10:32:23 +00:00
aamine 7622095d17 * parse.y (rb_gc_mark_parser): ruby_eval_tree is marked in eval.c.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-06 23:41:43 +00:00
nobu a449f78c89 * lib/mkmf.rb ($CC): command to compile C source.
* lib/mkmf.rb (try_compile): added.

* lib/mkmf.rb (egrep_cpp): use internal grep when pattern is
  Regexp, otherwise use external egrep command but get rid of
  pipe of command.com.

* lib/mkmf.rb (have_func): local variable should be volatile not
  to be eliminated by optimization.

* lib/mkmf.rb (create_makefile): link with CONFIG["LIBS"].

* lib/mkmf.rb (create_makefile): emit .SUFFIXES:.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-06 11:23:14 +00:00
matz 7881363731 * gc.c (ruby_xmalloc): remove MALLOC_LIMIT to avoid frequent
garabage collection.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-06 08:59:41 +00:00
aamine 95d65e34e1 * parse.y (rb_gc_mark_parser): should mark lex_input and ruby_debug_lines.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-06 03:09:07 +00:00
aamine e389d3d153 * parse.y (rb_gc_mark_parser): should mark parse.y global variables.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-06 02:44:51 +00:00
aamine 5ef74b512c * io.c (rb_io_puts): RSTRING(line)->ptr might be NULL.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-06 01:58:32 +00:00
aamine 4ebc9ec226 * parse.y: should not use non-NODE VALUEs in the semantic stack.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-06 01:24:41 +00:00
nobu 458673dd8a * file.c (rb_path_check): nothing to check under DOSISH.
[ruby-list:35772]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2803 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-05 20:53:31 +00:00
aamine 4464544e05 modify function name.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-05 20:09:52 +00:00
aamine 7ac3b71611 * gc.c (gc_sweep): should mark parser.
* parse.y (rb_gc_mark_parser): new function.
* intern.h (rb_gc_mark_parser): added.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-05 20:00:52 +00:00
matz 49cd091cf2 * variable.c (rb_path2class): should not use rb_eval_string().
* marshal.c (w_extended): should allow marshaling of object which
  is extended by named module.

* class.c (rb_make_metaclass): super may be T_ICLASS, need to skip.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-05 09:42:56 +00:00
michal 61ec0281a4 fix mem leaks (ruby-core:405, ruby-core:407)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-05 09:17:48 +00:00
nobu 1ec2805c4f * eval.c (rb_eval): overriding false constant with class/module
definition should be error.  (PR#327)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-05 04:15:50 +00:00
eban 8ed2c6fc8a * extmk.rb (create_makefile): add macro MAKEDIRS, INSTALL_PROG,
INSTALL_DATA.
* extmk.rb (create_makefile): support for building to any directory.
* extmk.rb (xsystem): move to mkmf.rb.
* mkmf.rb (xsystem): support for extmk.rb
* mkmf.rb ($CPP): remove '-E' option.  add CPPFLAGS.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-04 16:52:53 +00:00
arai 0e7b1e2632 refined.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-04 11:25:27 +00:00
matz 64901cd69b * class.c (rb_make_metaclass): obj.meta.super.meta should be equal
to obj.meta.meta.super (ruby-bugs-ja:PR#324).

* parse.y (yylex): the warning message "invalid
  character syntax" was never issued.

* marshal.c (r_bytes): do not use alloca (ruby-bugs:PR#382).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-04 06:37:39 +00:00
eban c10890f6d8 * extmk.rb: require mkmf.rb. remove duplicate methods.
use Config::CONFIG["FOO"] instead of @FOO@.
* mkmf.rb: extmk.rb support.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-03 08:40:47 +00:00
matz 6f484e4930 * variable.c (rb_copy_generic_ivar): remove old generic instance
variable table if it existes.

	* class.c (rb_make_metaclass): metaclass of a metaclass is a
	  metaclass itself.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-03 05:20:14 +00:00
nobu 20254d4e13 * re.c (rb_reg_search): MatchData must be rb_cMatch. (ruby-bugs-ja:PR#319)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-02 14:04:19 +00:00
aamine 10c4364287 * gc.c (gc_sweep): does reclaim nodes in also compile time, if we can.
* ruby.c (load_file): omit GC if we can.
* parse.y (ruby_parser_stack_on_heap): new function.
* intern.h (ruby_parser_stack_on_heap): added.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-02 12:19:30 +00:00
eban 4c3dc77fe6 * config.guess: fixed for Linux/PPC.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-01 06:58:09 +00:00
knu fb00e309f6 Add set.rb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-30 13:47:49 +00:00
H_Konishi 417231cdfe * ext/Win32API/Win32API.c (Win32API_Call): typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-30 12:02:04 +00:00
nobu 6e4ed1ffd3 * variable.c (rb_const_assign): st_delete() takes pointer to key.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-30 10:46:37 +00:00
nobu 09a27c5a90 commit miss.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-30 10:43:41 +00:00
nobu e855026500 * ext/Win32API/Win32API.c (Win32API_Call): RSTRING()->ptr may be
NULL.

* ext/nkf/nkf.c (rb_nkf_guess): ditto.

* ext/readline/readline.c (readline_s_set_completion_append_character):
  ditto.

* ext/socket/socket.c (sock_s_getaddrinfo, sock_s_getnameinfo):
  ditto.

* ext/tcltklib/tcltklib.c (ip_toUTF8, ip_fromUTF8): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-30 10:42:09 +00:00
H_Konishi b4ea040b31 * bcc32/MakeFile.sub (sitearch): add.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-29 14:36:29 +00:00
matz 40bc4f5ae4 * array.c (rb_ary_become): should not free ptr if it's shared.
* eval.c (rb_alias): prohibit making an alias named "allocate" if
  klass is a metaclass.

* string.c (rb_string_value_ptr): StringValuePtr() should never
  return NULL pointer.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-29 09:08:18 +00:00
eban 3bf972993f * io.c (read_all): should use off_t instead of long.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-29 04:38:37 +00:00
nobu 3badfbf1d5 (ruby-bugs-ja:PR#296)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-28 16:00:34 +00:00
nobu 9208c74718 * marshal.c (r_object): yield loaded objects, not intermediates.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-28 15:58:35 +00:00
michal 5c70716bdc variable.c: Get rid of fix len buffer in rb_class_path (ruby-core:381)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-28 14:59:01 +00:00
nobu b961db7587 * io.c (appendline): data was lost when raw mode.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-28 14:36:38 +00:00
nobu 343f505fb8 * ext/stringio/stringio.c (strio_initialize): RSTRING(mode)->ptr
can be NULL.

* ext/stringio/stringio.c (strio_ungetc): fix buffer overflow.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-28 10:14:06 +00:00
michal 29966e099c file.c: fix mem leak in rb_stat_init
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-28 09:25:07 +00:00
nobu 8790d9b76e * win32/win32.c (kill): negate pid under Win9x.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-28 08:56:25 +00:00
eban 3685a85b3d * configure.in (ar): don't check twice for ar.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-28 07:38:25 +00:00
matz 1a44a463af * string.c (rb_str_delete_bang): should check if str->ptr is 0.
* string.c (rb_str_squeeze_bang): ditto.

* string.c (rb_str_count): ditto.

* string.c (rb_str_lstrip_bang): ditto.

* string.c (rb_str_rstrip_bang): ditto.

* string.c (rb_str_intern): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-28 06:01:58 +00:00
usa c1454b3acb * win32/win32.h: define SIGINT and SIGKILL if not defined.
* win32/win32.c: remove definition of SIGINT and SIGKILL.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-28 02:39:29 +00:00