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

429 Коммитов

Автор SHA1 Сообщение Дата
nobu d760f97172 * lib/thread.rb (Queue::pop): get rid of race condition.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-06 02:43:02 +00:00
matz b7bc0cae53 * string.c (rb_str_aset): should raise error if an indexing string
is not found in the receiver.

* sprintf.c (rb_f_sprintf): "%d" should convert objects into
  integers using Integer().

* lib/tempfile.rb (Tempfile::size): added.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-04 07:34:19 +00:00
matz 34f5c4061c * range.c (range_step): iteration done using "+" if elements are
Numeric.  Otherwise using "succ".

* range.c (range_each): iteration done using "succ".  If the
  elements does not respond to "succ", raise TypeError.  As a
  result, all Enumerable methods, e.g. collect, require elements
  to respond to "succ'.

* range.c (range_member): comparison done using "each", if
  elements are non-Numeric or no-"succ" objects.  Otherwise
  compare using "<=>".

* range.c (Init_Range): remove "size" and "length".


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-30 06:12:29 +00:00
wakou 21b2953030 * lib/cgi.rb: if StringIO is usable then use it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-30 00:21:05 +00:00
wakou 4b3a6c7aec fix for POST method.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-29 05:39:09 +00:00
matz 4ab1577db3 * parse.y: yyparse #defines moved from intern.h
* ruby.c (proc_options): access prefixed "ruby_yydebug".

* applied modifies to pacify some of gcc -Wall warnings.

* parse.y (arg): no more ugly hack for "**", so that "-2**2" to be
  parsed as "(-2)**2", whereas "- 2**2" or "-(2)**2" to be parsed
  as "-(2**2)".

* parse.y (yylex): '-2' to be literal fixnum. [new]

* time.c (time_succ): new method for Range support.

* time.c (time_arg): nil test against v[6] (usec).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-29 05:20:39 +00:00
wakou 99551555c8 * lib/cgi.rb: not use const if GET, HEAD. check multipart form head.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-29 04:48:32 +00:00
wakou 221e3c4c07 Tue May 21 04:48:37 2002 Sean Chittenden <sean@chittenden.org>
* lib/cgi-lib.rb: Checking for constant MOD_RUBY instead of
	  environment variable. Remove a mod_ruby warning and use
	  Apache::request.headers_out[] instead.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-20 19:56:52 +00:00
tadf e592b8f286 added an entry (date/format.rb).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-19 10:28:36 +00:00
tadf a0a9227b71 use Array#select instead of Array#indexes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-18 12:57:54 +00:00
tadf dc9cd6a8c2 updated to the new version (based on date2 3.2.1).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-18 12:41:51 +00:00
knu 323af7e264 * lib/mkmf.rb: exclude topdir from the system configuration
section and prevent it from being overridden.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-04 21:57:32 +00:00
eban 2b4ad0cc22 * ext/extmk.rb.in, lib/mkmf.rb: use 'do...end' instead of '{}' for Borland make.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-02 09:31:29 +00:00
matz b134b91278 * various files: macro fix-up by Michal Rokos.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-25 13:57:01 +00:00
gotoken 4ec25bdd63 discarded unused parameter
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-24 19:14:59 +00:00
matz e3a8c62630 * io.c (rb_io_mode_flags): both 'r+b' and 'rb+' should be allowed.
* io.c (rb_io_mode_modenum): ditto.

* gc.c (rb_memerror): rename from mem_error, and exported.

* gc.c (Init_GC): pre-allocate NoMemoryError instance.

* object.c (convert_type): error message changed from "failed to
  convert" to "cannot convert", since it does not try to convert
  if an object does not respond to the converting method.

* eval.c (block_pass): convert Method to Proc using
  rb_check_convert_type().

* object.c (rb_check_convert_type): always convert T_DATA

* eval.c (rb_thread_cleanup): should not terminate main_thread by
  Fatal error.

* regex.c (is_in_list): need to not exclude NUL and NEWLINE.

* re.c (rb_reg_expr_str): wrong backslash escapement.

* re.c (rb_reg_expr_str): do not escape embedded space
  characters.

* marshal.c (w_object): T_DATA process patch from Joel VanderWerf
  <vjoel@PATH.Berkeley.EDU>.  This is temporary hack; it remains
  undocumented, and it will be removed when marshaling is
  re-designed.

* marshal.c (r_object): ditto.

* numeric.c (num_step): Integer#step is moved to Numeric#step;
  Fixnum#step is merged into this method.

* numeric.c (int_dotimes): Fixnum#times is merged.

* numeric.c (int_upto): Fixnum#upto is merged.

* numeric.c (int_downto): Fixnum#downto is merged.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-24 04:54:16 +00:00
nobu b596fbbc37 * ext/stringio/stringio.c (strio_mark): must check if ptr is NULL
first.  [ruby-talk:38873]

* lib/mkmf.rb (create_makefile): should print depend file when
  make is other than nmake.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-23 16:22:25 +00:00
usa ad8dbab888 * ext/extmk.rb.in (create_makefile): use `{$(srcdir)}' directive instead
of `$(srcdir)/' when including depend file.

* lib/mkmf.rb (create_makefile): add `{$(srcdir)}' when including depend
  file.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-23 15:43:26 +00:00
eban 512db243d7 * configure.in: cleanup for autoconf 2.5x.
* configure.in: use gcc -shared instead of dllwrap on Cygwin/MinGW.
* ext/extmk.rb, lib/mkmf.rb: get rid of "--def=".


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-19 07:39:40 +00:00
akr 53641c5118 modify document.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-18 05:11:31 +00:00
matz 5527b3b961 * eval.c (assign): ruby_verbose should be surrounded by RTEST().
* object.c (rb_str2cstr): ditto.

* parse.y (void_expr): ditto.

* parse.y (void_stmts): ditto.

* variable.c (rb_ivar_get): ditto.

* variable.c (rb_cvar_set): ditto.

* variable.c (rb_cvar_get): ditto.

* dir.c (glob_helper): should have proceed link when link->path
  was non existing symbolic link.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-11 10:03:01 +00:00
wakou bd074c1f03 * lib/cgi/session.rb: support for multipart form.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-10 17:02:47 +00:00
matz 19c42c0740 * variable.c (rb_obj_remove_instance_variable): raise NameError if
specified instance variable is not defined.

* variable.c (generic_ivar_remove): modified to check ivar
  existence.

* file.c (rb_file_s_extname): new method based on the proposal
  (and patch) from Mike Hall. [new]

* eval.c (error_handle): default to 1 unless status is set.

* eval.c (ruby_options): guard error_handle() with PROT_NONE.

* eval.c (ruby_stop): ditto.

* math.c (math_acosh): added. [new]

* math.c (math_asinh): ditto.

* math.c (math_atanh): ditto.

* struct.c (rb_struct_each_pair): method added. [new]

* class.c (rb_singleton_class): wrong condition; was creating
  unnecessary singleton class.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-10 08:45:26 +00:00
nobu afc4cd48d1 * lib/mkmf.rb (try_link0): need expand macro in command, sync with
ext/extmk.rb.in.

* lib/mkmf.rb (try_cpp): ditto.

* lib/mkmf.rb (egrep_cpp): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-09 04:43:12 +00:00
matz 1c6a8e4deb * Makefile.in (CPPFLAGS): remove @includedir@.
* lib/mkmf.rb (create_makefile): ditto.

* ext/extmk.rb.in (create_makefile): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2320 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-02 06:48:45 +00:00
ttate edf4c88f79 mkmf.rb: files[0,1] == "." -> files[0,2] == "./"
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-01 17:42:32 +00:00
ttate 46a7493b6c lib/mkmf.rb: install any files using $INSTALLFILES. (from [ruby-dev:16683])
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-01 15:01:56 +00:00
nahi 76f963d077 Changed the regexp again to simplify code. See also [ruby-dev:16682].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-29 11:52:09 +00:00
nobu 014c5da903 * lib/mkmf.rb (create_makefile): default FLAGS to empty strings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-29 11:25:01 +00:00
nobu 09651f0431 * lib/mkmf.rb (arg_config): should use Shellwords::shellwords like
ext/extmk.rb.in.

* lib/mkmf.rb (enable_config): default had priority over command
  line options and configure_args.

* lib/mkmf.rb: support autoconf 2.53 style variables from
  environment.

* lib/mkmf.rb: add directory options.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-29 07:42:20 +00:00
nahi 766762300b Changed regexp for parsing break command '.*?+' to '.+'.
See also [ruby-dev:16652].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-29 03:05:11 +00:00
aamine 1ea1fbe85d * lib/net/http.rb: HTTP.get accepts URI.
* lib/net/http.rb: add some HTTP 1.1 response codes.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-26 11:18:02 +00:00
aamine fb54b37850 * lib/fileutils.rb: new file.
* lib/README: add fileutlis.rb.
* doc/NEWS: add fileutils.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-26 02:03:04 +00:00
akr 4795daf1bc * lib/pp.rb (pp): return nil like p.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-25 18:24:46 +00:00
aamine 890521d117 racc runtime imported.
* lib/racc/parser.rb: new file.
* ext/racc/MANIFEST, cparse.c, depend, extconf.rb: new files.
* lib/README: add racc/parser.rb.
* ext/Setup*: add racc/cparse.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-22 07:20:31 +00:00
aamine b90b70d734 net/protocol.rb: Protocol#start should return self.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-22 05:24:00 +00:00
akr 0c41c1fc22 * lib/resolv.rb: fix arguments to create exceptions.
Patch from matt@lickey.com.  (ruby-bugs:PR#278)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-22 05:15:44 +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
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
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
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
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
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
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
nahi 6e2ad002ed Corrected mis-indentation. Try diff -w to find that these are the same without
indentation.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-25 15:30:31 +00:00
nobu aaa30fd040 * lib/shell.rb (Shell::expand_path): relative to @cwd.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-25 04:35:12 +00:00
nahi 018c5191bf Refactoring. Added Context#format_frame to format a frame, used by up/down
command and Context#display_frames.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-23 09:40:58 +00:00
aamine d80b8cd59e modify typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-22 12:54:11 +00:00
aamine d3b66ccf45 * lib/net/protocol.rb: set read_timeout dynamically.
* lib/net/http.rb: @@newimpl is always true in the main trunk.
* lib/net/http.rb: HTTP.port -> default_port
* lib/net/http.rb: HTTPResponse.read_response_status -> read_status_line


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-22 12:10:58 +00:00