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

1293 Коммитов

Автор 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