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

2081 Коммитов

Автор SHA1 Сообщение Дата
seki 4de16dfb24 add bin/erb
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-20 14:41:05 +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
akira 710e25422b URI::extract extracts only URIs of specified schemes when schemes are specified.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-19 07:45:10 +00:00
matz 86a5ba2b01 initialize hack
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-19 02:00:18 +00:00
matz 3dc5049a49 defines.h: hack for the case sizeof(short) == sizeof(int)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-18 23:15:01 +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 7da58dad33 Oops, I mean ruby_install_name.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-18 17:40:09 +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 c3a31863c5 sample/irb.rb -> bin/irb
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-18 17:08:55 +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 734665d3a9 Improve the comment section.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-18 07:26:44 +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
seki e6251100cc * add ERB
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-17 16:11:40 +00:00
nobu a1ca199bae 2002-11-17
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-17 14:02:02 +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 8a442aa52a * ostruct.rb: keep NoMethodError message with Ruby itself.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-15 16:12:43 +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 e66faf84ce 2002-11-14
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-14 13:51:40 +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 e60d556321 2002-11-13
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-13 08:55:49 +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
nahi 237229e201 DEBUGGER__::Context::debug_print_help: Typo fix of help message.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-09 15:34:20 +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 a61871bea2 * parse.y: back out an unintended change in the syntax.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-07 23:01:45 +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
ttate 8e3721dfa8 Get rid of ineffective symbols, lines, constants and so on.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-07 16:42:07 +00:00
nobu 56cddaf082 2002-11-07
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-07 01:03:29 +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
ttate 3a86596df1 fixed rb_ary2cary() to convert nil.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-05 13:11:29 +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 6cff858589 Fix a bogon in the last commit. (reported by WATANABE Tetsuya in
[ruby-dev:18634])


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-03 23:16:52 +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
knu c960141333 2002-10-30
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-01 21:44:47 +00:00
ttate 5918d2a914 Bugfix for Importable::callback.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-31 08:37:16 +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 454abc5185 2002-10-29
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-29 19:11:29 +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