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

816 Коммитов

Автор SHA1 Сообщение Дата
nobu 7632b48a7d * ext/stringio/stringio.c (check_modifiable): wrong declaration.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-18 13:21:01 +00:00
nobu 5979f0e288 * ext/digest: add depend file.
* ext/digest/md5: ditto.

* ext/digest/rmd160: ditto.

* ext/digest/sha1: ditto.

* ext/digest/sha2: ditto.

* ext/iconv/MANIFEST: ditto.

* ext/stringio/MANIFEST: ditto.

* ext/syslog: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-18 09:24:39 +00:00
nobu 7dc66370cb * eval.c (rb_f_abort): should not bypass cleanup.
* ext/stringio/stringio.c (check_modifiable): void function.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-18 08:21:40 +00:00
eban 2059c382a6 * ext/iconv/extconf.rb: workaround for GNU libiconv.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-18 03:54:10 +00:00
nobu 22270b6d4b * parse.y (parse_string): part of multi-byte sequence must not
match to paren.

* parse.y (parse_qstring): ditto.

* parse.y (parse_quotedwords): ditto.

* parse.y (str_extend): handle multi-byte characters.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-18 02:04:23 +00:00
nobu e3235029ad * enum.c (enum_find): catch a value before recycle.
* enum.c (enum_all): ditto.

* enum.c (enum_any): ditto.

* enum.c (enum_min): ditto.

* enum.c (enum_max): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-18 01:48:56 +00:00
nobu cecb9cae01 * enum.c (enum_inject): use the first iterated element as the
initial value when omitted.

* enum.c (inject_i): ditto.

* enum.c (Init_Enumerable): Enumerable#inject now takes variable
  count arguments.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-18 01:46:33 +00:00
nobu b4e74d4038 added depend files in ext/iconv and ext/stringio.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-17 11:09:31 +00:00
eban ef6534477d * missing/fileblocks.c: add for autoconf.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-16 14:07:06 +00:00
nobu 2a86587d95 * win32/win32.c (StartSockets): remove duplicated lines.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-15 10:49:05 +00:00
usa 6ba0d31e8f * bignum.c, intern.h (rb_ull2big, rb_ll2big, rb_ull2inum, rb_ll2inum,
big2ull, rb_big2ull, rb_big2ll): use LONG_LONG macro instead of
  long long.
* numeric.c, intern.h, ruby.h (rb_num2ll, rb_num2ull): ditto.
* ruby.h: use _I64_MAX and _I64_MIN if they are defined (for VC++).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-15 08:51:31 +00:00
nobu 23beb1a9dd * ext/iconv/iconv.c: fixed document, Iconv#new is no longer an
iterator. thanks to Tanaka Akira <akr@m17n.org>.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-15 05:05:34 +00:00
nobu 390ae31a6f * ext/iconv: imported.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-14 13:26:28 +00:00
eban c4d80ad690 * configure.in: autoconf 2.53 support. use AC_LIBOBJ.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-14 07:20:34 +00:00
matz 997b69cb6a * re.c (rb_reg_match): should clear $~ if operand is nil.
* re.c (rb_reg_match2): ditto.

* configure: merge Jonathan Baker's large file support patch
  [ruby-talk:35316], with read_all patch in [ruby-talk:35470].

* eval.c (rb_f_abort): optional message argument that be printed
  on termination. [new]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2200 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-14 06:23:46 +00:00
nobu 4f0870f74b * ext/stringio/stringio.c: fixed frozen string bug. ungetc no
longer raises on readonly stream unless modifies actually.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2198 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-14 03:35:52 +00:00
nobu bce7601f73 * string.c (rb_str_subpat_set): must make str independent after
rb_reg_search() matched.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-14 00:10:49 +00:00
nobu f963fa6956 typo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-14 00:04:05 +00:00
nobu a1f4ea2127 * dir.c (rb_push_glob): avoid SEGV when no block given.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-13 23:59:41 +00:00
knu b9522c1687 * dir.c: FNM_PERIOD is obsoleted and FNM_DOTMATCH is introduced
instead, which has the opposite meaning of FNM_PERIOD.

* dir.c: Dir::glob now accepts optional FNM_* flags via the second
  argument, whereas Dir::[] doesn't.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-13 10:11:09 +00:00
knu 14461ddae6 * lib/getopts.rb: single_options can be nil[*], and is not not
optional. ([*]Pointed out by gotoken)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-13 09:44:59 +00:00
matz 43b18e733d * regex.c (re_compile_pattern): '\0111' should be '\011' plus '1',
since octal literals are formed by three digits at most.

* marshal.c (w_object): module inclusion using extend() should
  also be detected.

* eval.c (rb_eval_cmd): cbase should not be NULL; it should be
  either ruby_wrapper or Object.

* enum.c (enum_each_with_index): should return self.

* process.c (proc_setpgrp): should return value for non-void function.

* process.c (proc_getpgid): should raise exception if getpgid() return -1.

* string.c (rb_str_ljust): should return a duplicated string.

* string.c (rb_str_rjust): ditto.

* string.c (rb_str_center): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-12 09:28:50 +00:00
akr 230034b7ab * lib/resolv.rb: don't complete domains for absolute FQNs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-12 08:12:32 +00:00
akr 8b9823a23d * lib/tsort.rb: new file.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-11 14:09:11 +00:00
nobu 5152350dc8 StringIO
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-11 12:39:23 +00:00
matz 86c6af5873 * marshal.c (w_object): module inclusion using extend() should
also be detected.

* eval.c (rb_eval_cmd): cbase should not be NULL; it should be
  either ruby_wrapper or Object.

* enum.c (enum_each_with_index): should return self.

* process.c (proc_setpgrp): should return value for non-void function.

* process.c (proc_getpgid): should raise exception if getpgid() return -1.

* string.c (rb_str_ljust): should return a duplicated string.

* string.c (rb_str_rjust): ditto.

* string.c (rb_str_center): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-11 08:02:04 +00:00
akr 81930da895 * ext/socket/extconf.rb (have_struct_member): don't print checked
result.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-08 23:47:36 +00:00
matz d497898c23 * eval.c (cvar_cbase): utility function to find innermost non
singleton cbase.

* eval.c (is_defined): adopt new cvar behavior.

* eval.c (rb_eval): ditto.

* eval.c (assign): ditto.

* class.c (rb_mod_clone): should not call rb_obj_clone(), since
  Module does not provide "allocate".

* class.c (rb_singleton_class): should crate new singleton class
  if obj is a class or module and attached object is different,
  which means metaclass of singleton class is sought.

* time.c (time_s_alloc): now follows allocation framework.

* eval.c (rb_eval): should initialize outer class variables from
  methods in singleton class definitions.

* eval.c (assign): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-08 07:03:09 +00:00
akr d41f53d0b6 * lib/resolv.rb: use its own thread group for background threads.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-08 03:19:53 +00:00
nobu effd8230ea * gc.c (rb_source_filename): added. holds unique strings for file
names with GC space.

* gc.c (rb_gc_mark): mark source file name.

* gc.c (gc_sweep): ditto.

* gc.c (Init_GC): initialize source file name table.

* intern.h (rb_source_filename): added.

* eval.c (rb_eval_string): use rb_source_filename().

* parse.y (yycompile): ditto.

* ruby.c (proc_options): ditto.

* ruby.c (load_file): ditto.

* ruby.c (ruby_script): ditto.

* ruby.c (ruby_prog_init): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-07 11:19:37 +00:00
eban 6dc931e59f * dln.c (dln_load): use LoadLibrary instead of LoadLibraryEx.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-06 09:00:32 +00:00
knu d99f6d7ff6 - Slightly fix one of the last entries. (stdin -> stdin or stdout)
- Fix indentation.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2164 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-04 21:29:11 +00:00
knu f2dfae7ea0 * lib/getopts.rb: Rewrite to fix some bugs and complete features.
- Accept options with the colon in the first argument;
    getopts("a:bcd:") is equivalent to getopts("bc", "a:", "d:").
  - Do not discard the argument that caused an error.
  - Do not discard '-', which commonly stands for stdin.
  - Allow specifying a long option with a value using '='.
    (command --long-option=value)
  - Stop reading options when it meets a non-option argument.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-04 21:15:47 +00:00
knu ab1b4b5869 * ext/extmk.rb.in (dir_config): Sync with mkmf.rb: Fix a bug where
--with-xx-{include,lib} is ignored when --with-xx-dir is
  specified.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-04 04:24:26 +00:00
akr 9496c3776d fix method name.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-03 11:03:05 +00:00
eban 1188f3f1d9 * ext/socket/{addinfo.h,getaddrinfo.c} (gai_strerror): add const
qualifier only for uClibc.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-01 02:32:21 +00:00
shugo a5ecc30e7d * ChangeLog: fixed the description of getacl.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-01 02:30:08 +00:00
shugo 4a58b0fd7c * lib/net/imap.rb: added document.
* lib/net/imap.rb (getquotaroot): new method.
* lib/net/imap.rb (setacl): remove the rights if the rights
parameter is nil.
* lib/net/imap.rb (getacl): return a MailboxACLItem object.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-01 02:27:37 +00:00
akr 7806b0ae28 * dln.c (dln_load): fix typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-28 22:05:01 +00:00
akr 4efd36bbd9 * ext/socket/extconf.rb (have_struct_member): new method.
check msg_control and msg_accrights in struct msghdr.  check sys/uio.h.

* socket/socket.c: include sys/uio.h if available.
(thread_read_select): new function.
(unix_send_io): ditto.
(unix_recv_io): ditto.
(unix_s_socketpair): ditto.
(Init_socket): define UNIXSocket#send_io, UNIXSocket#recv_io,


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-28 21:31:35 +00:00
matz e88d2cec1f * eval.c (rb_mod_include): load modules in argument order.
* st.c (st_init_table_with_size): num_bins should be prime numbers
  (no decrement).

* st.c (rehash): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-28 06:53:33 +00:00
matz 3fc04d9361 * ext/dbm/dbm.c (fdbm_select): 1.7 behavior.
* ext/gdbm/gdbm.c (fgdbm_select): ditto.

* ext/sdbm/sdbm.c (fsdbm_select): ditto.

* ext/dbm/dbm.c (fdbm_delete): adopt Hash#delete behavior.

* ext/sdbm/sdbm.c (fsdbm_delete): ditto.

* ext/gdbm/gdbm.c: need not to dup key to the block.

* ext/sdbm/sdbm.c : replace RuntimeError with SDBMError.

* eval.c (rb_f_missing): NoMethod error messages for true, false,
  nil must respond visibility like for other objects.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-27 04:52:21 +00:00
eban 2fcd221fec * io.c (READ_DATA_PENDING): uClibc support.
* random.c (rand_init): ditto.
* ext/socket/{addinfo.h,getaddrinfo.c} (gai_strerror): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-27 04:30:20 +00:00
knu 4e840877aa * ext/digest/sha2/sha2.c: Merge from rough. Fix a couple of
off-by-one errors in Aaron Gifford's code.

  Obtained from:  KAME via FreeBSD
  KAME PR:        393
  FreeBSD PR:     kern/34242


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-26 22:09:49 +00:00
usa 210ebe1acf * bignum.c (rb_big_2comp): void function cannot return any value.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-26 12:36:26 +00:00
matz 8d456d453c * eval.c (rb_eval): call trace_func for if/while conditions.
* marshal.c (r_object): separate r_regist from proc calling.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-26 06:48:59 +00:00
akira 3916df613e * lib/uri/generic.rb: merge0 shuld return [oth, oth] if oth is absolute URI.
* lib/uri/generic.rb: registry part must not be allowed for any schemes for the Internet. (RFC2396, section 3.2.2 and 3.2.1.)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-26 02:36:05 +00:00
knu 09290070e8 * ext/syslog/syslog.c: Merge from rough. Use SafeStringValue().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-25 12:23:47 +00:00
knu b700e189bd * ext/syslog/syslog.c: Merge from rough. Turn Syslog into a
module keeping backward compatibility intact.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-25 12:13:30 +00:00
nobu 0778120490 * sample/test.rb (system): test with scripts under the source
directory.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-25 10:43:13 +00:00