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

1468 Коммитов

Автор SHA1 Сообщение Дата
nobu c39a8e326a * string.c (rb_str_substr): should share the shared string if
present, instead of the original string.  (ruby-bugs:PR#528)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-30 07:55:17 +00:00
nobu 3d2ddca6b2 * ext/socket/socket.c (tcp_svr_init): local host to
init_inetsock() is VALUE but not pointer.

* ext/socket/socket.c (sock_s_unpack_sockaddr_in): get rid of
  gcc-3 -O3 warning.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-29 20:14:51 +00:00
nobu f0371138ee * file.c (rb_file_s_chmod): get rid of gcc-3 -O3 warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-29 18:14:22 +00:00
nobu 05b990b7c1 * gc.c (gc_sweep): adjust GC trigger.
* dln.c (init_funcname_len): get rid of gcc-3 -O3 warning.

* eval.c (copy_node_scope): ditto.

* hash.c (rb_hash_foreach, delete_if_i, select_i, each_value_i,
  each_key_i, each_pair_i, envix): ditto.

* range.c (range_each_func): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-29 14:51:22 +00:00
aamine 0569c8422c add location.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-29 06:32:09 +00:00
aamine 8b034b5f3d forgot to commit ChangeLog.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-29 06:29:52 +00:00
usa 4a1c7e5f6d * lib/fileutils.rb (cmp): return false if file size differs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-28 20:11:35 +00:00
eban 2672d0cc28 * instruby.rb: remove junk args.
* lib/mkmf.rb (create_makefile): remove a trouble library
  before making a shared library.
* win32/Makefile.sub: invoke instruby.rb with the --make-flags option.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-28 10:32:05 +00:00
wakou 025723b978 * lib/cgi.rb (CGI#[]): improvement. thanks to Kazuhiro NISHIYAMA
<zn@mbf.nifty.com>


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-27 18:12:36 +00:00
eban 96d8d4862f 2002-12-28
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-27 17:00:29 +00:00
nobu 212d3ebfff * bcc32/setup.mak, win32/setup.mak(-prologue-): move srcdir from
CPP input or UNC path will be removed as a comment.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-27 12:42:06 +00:00
uema2 e0006c665d * wince/config, wince/configure.bat: replace 1.7 with 1.8
in macros.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-27 08:55:31 +00:00
aamine 46f9785468 * instruby.rb: fileutils.rb accepts only one argument.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-27 04:23:52 +00:00
aamine 585cf46325 * lib/fileutils.rb (fu_parseargs): reject illegal options correctly.
* lib/fileutils.rb (uptodate?): parameter declaration was wrong.
* lib/fileutils.rb: change coding styles.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-27 04:21:27 +00:00
nobu 888b9a9739 * instruby.rb: check only `-' option, and use fileutils instead of
ftools.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-26 18:01:34 +00:00
wakou 2c5e792dd2 * lib/net/telnet.rb: Telnet#print not add "\n".
* lib/cgi.rb: cgi['key'] is equal cgi['key'][0]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-26 17:48:29 +00:00
eban cdefda39b4 commit miss.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-26 15:15:44 +00:00
usa b90bdc3e25 * win32/setup.mak (-prologue-): moved srcdir macro definition.
[ruby-win32:420].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-26 10:27:57 +00:00
matz 1b07582fcc * regex.c (re_match_exec): fix odd \G behavior based on the patch
from Nobu.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-25 07:44:33 +00:00
nobu 25fa63dc04 * bcc32/setup.mak (-generic-): removed garbages.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-25 02:08:24 +00:00
usa 8b79dd5e82 * bcc32/Makefile.sub, win32/Makefile.sub (RUBY_SO_NAME, config.h):
use $(MAJOR) and $(MINOR). based on Nobu's patch. [ruby-win32:413]

* bcc32/setup.mak, win32/setup.mak (-prologue-): define MAJOR, MINOR
  and TEENY from version.h. based on Nobu's patch. [ruby-win32:413]

* win32/Makefile.sub (config.h): add HAVE_FLOAT_H.

* win32/Makefile.sub (parse.obj): depend on win32/win32.h.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-25 01:49:27 +00:00
knu 58e53cddef * lib/irb/completion.rb: Use Object#class rather than Object#type.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-24 14:50:10 +00:00
knu 36dbbb1b6a * lib/cgi.rb (Cookie::parse), lib/cgi-lib.rb (initialize): Do not
pass to split() a bare string longer than 2 characters as
  separator.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-24 14:42:38 +00:00
usa 96737482af * numeric.c (DBL_MAX_10_EXP): fix typo. [ruby-dev:36826]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-24 10:20:29 +00:00
matz ee9d5d41d1 021224
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-24 08:53:56 +00:00
matz e274c3ab76 * class.c (ins_methods_i): should not show ID_ALLOCATOR.
* class.c (ins_methods_prot_i): ditto.

* class.c (ins_methods_priv_i): ditto.

* class.c (ins_methods_pub_i): ditto.

* eval.c (call_trace_func): ditto.

* eval.c (rb_undefined): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-24 08:02:00 +00:00
knu 51c4390f68 * lib/README: Synchronize with reality.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-23 17:13:25 +00:00
knu 9ec0a96ad4 * MANIFEST, lib/README, lib/ipaddr.rb: Add ipaddr.rb from rough.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-23 17:07:49 +00:00
usa ec827b7112 * ext/dbm/dbm.c (fdbm_alloc): allocator takes only one argument.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3198 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-21 19:08:50 +00:00
usa b469f3155a * array.c (ary_alloc), dir.c (dir_s_alloc), eval.c (thgroup_s_alloc),
file.c (rb_stat_s_alloc), hash.c (hash_alloc), io.c (io_alloc),
  object.c (rb_module_s_alloc, rb_class_allocate_instance),
  re.c (match_alloc, rb_reg_s_alloc), string.c (str_alloc),
  time.c (time_s_alloc), ext/digest/digest.c (rb_digest_base_alloc),
  ext/tcltklib/tcltklib.c (ip_alloc),
  ext/win32ole/win32ole.c (fole_s_allocate, fev_s_allocate)
  : add prototype to get rid of VC++ warnings.

* ext/sdbm/init.c (fsdbm_alloc): allocator takes only one argument.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-21 18:02:01 +00:00
eban a36b7eea8a * lib/mkmf.rb (create_makefile): accept pure ruby libraries.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-21 15:42:10 +00:00
nobu d0527b05d8 * misc/ruby-mode.el (ruby-parse-partial): keywords must not be
preceded by @ or $.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-20 22:27:30 +00:00
nobu 85ce703fab ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-20 11:30:13 +00:00
nobu 3780ede6ef * ext/curses/curses.c, ext/digest/digest.c, ext/dl/handle.c,
ext/dl/ptr.c, ext/dl/sym.c, ext/gdbm/gdbm.c, ext/iconv/iconv.c,
  ext/stringio/stringio.c, ext/strscan/strscan.c,
  ext/tcltklib/tcltklib.c, ext/win32ole/win32ole.c:
  use rb_define_alloc_func().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-20 11:23:40 +00:00
nobu 5b615c70eb * io.c (rb_io_fwrite): separated from io_write().
* marshal.c (w_byten): use rb_io_fwrite() to support non-blocking
  IO, and added error check.

* rubyio.h: prototypes; rb_io_fwrite


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-20 09:29:41 +00:00
matz 71ef585f4e * object.c (Init_Object): should not remove Class#allocate.
* lib/profiler.rb: separate profiling functions, without
  trace_func and at_exit setting.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-20 09:00:10 +00:00
matz bc49bc7c6b * parse.y (do_block): split "do" block and tLBRACE_ARG block.
* parse.y (cmd_brace_block): new tLBRACE_ARG block rule

* parse.y (command): can take optional cmd_brace_block; use %prec
  to resolve shift/reduce conflict. (ruby-bugs-ja PR#372)

* eval.c (ruby_finalize): trace_func should be cleared here (after
  executing exit procs and finalizers).

* eval.c (rb_define_alloc_func): new allocation framework, based
  on Nobu's work [ruby-dev:19116].  "allocate" method is no longer
  used for object allocation.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-20 08:33:17 +00:00
knu c3cd615aa4 * lib/README, lib/cgi/ftplib.rb, lib/telnet.rb: Delete ftplib.rb
and telnet.rb.  It has been quite some time sinc they were
  obsoleted and made to emit warnings.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-19 20:08:43 +00:00
knu 9c95229c73 * lib/tempfile.rb: Embed Rdoc style comments.
* lib/tempfile.rb: Add length as an alias for size.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-19 20:00:19 +00:00
knu 8451053741 Add Tempfile#close!() as a shorthand for Tempfile#close(true).
Add Tempfile#{unlink,delete}().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-19 19:01:59 +00:00
knu d9fbdddb59 Delete final.rb, which was obsoleted long ago.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-19 18:55:32 +00:00
nobu 5f4f0807e9 * re.c (rb_reg_match_pre, rb_reg_match_post, match_to_a,
match_select): return instances of same class as the original
  string.  [ruby-dev:19119]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-19 15:21:01 +00:00
usa 32145b0652 * numeric.c (DBL_EPSILON): fix typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-19 13:56:28 +00:00
nobu 98ecd65d9a [BUG] not SEGV.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-19 13:39:48 +00:00
nobu cf5ecdfcbb * eval.c (assign): avoid SEGV at multiple attribute assignment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-19 13:38:47 +00:00
matz baa00aa250 * numeric.c (num_step): use DBL_EPSILON.
* array.c (rb_check_array_type): new function: return an array
  (convert if possible), or nil.

* string.c (rb_check_string_type): new function: return a string
  (convert if possible), or nil.

* numeric.c (rb_dbl_cmp): returns nil if values are not
  comparable.

* numeric.c (fix_cmp,flo_cmp): use rb_num_coerce_cmp()

* bignum.c (rb_big_cmp): ditto.

* numeric.c (rb_num_coerce_cmp): new coercing function for "<=>",
  which does not raise TypeError.

* numeric.c (do_coerce): can be supress exception now.

* object.c (rb_mod_cmp): should return nil for non class/module
  objects.

* re.c (rb_reg_eqq): return false if the argument is not a
  string.  now returns boolean value.

* class.c (rb_include_module): argument should be T_MODULE, not
  T_class, nor T_ICLASS.

* eval.c (is_defined): "defined?" should return "assignment" for
  attribute assignment (e.g. a.foo=b) and indexed assignment
  (e.g. a[2] = 44).

* parse.y (aryset): use NODE_ATTRASGN.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-19 09:20:20 +00:00
knu b54b4b79ec Add a missing ||.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-18 19:22:46 +00:00
nobu f8c8a38d30 * string.c (rb_str_dup_frozen): handle tail shared string.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-18 11:50:49 +00:00
nobu f4b8bbb143 * string.c (rb_str_new4): handle tail shared string.
(ruby-bugs-ja:PR#370)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3164 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-17 18:20:46 +00:00
nobu 49fc21f31e * re.c (rb_reg_nth_match): tail sharing.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-17 12:15:45 +00:00
nobu 86db656415 * node.h (NODE_ATTRASGN): new node, assignment to attribute.
[ruby-core:00637].

* eval.c (is_defined, rb_eval): ditto.

* parse.y (attrset, node_assign): ditto.

* string.c (rb_str_substr): tail sharing.  [ruby-core:00650]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-17 10:34:30 +00:00
akr 3a20ed532b * lib/open-uri.rb: new file.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-16 19:06:36 +00:00
usa d46991c6de * file.c (utimbuf): need to define for VC++.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-16 15:30:00 +00:00
nobu 65f3eef1ee * parse.y (nextc): get rid of overrun. (pointed out by akr
[ruby-list:36773])


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-16 06:56:33 +00:00
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
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