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

497 Коммитов

Автор SHA1 Сообщение Дата
knu e45f8f9943 * ruby.h: fix a wrong function name: rb_iglob() -> rb_globi().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-08 11:54:55 +00:00
aamine 2b67bb576a aamine
* lib/net/http.rb: rename HTTP#request_by_name to send_request.
* lib/net/protocol.rb (ProtoSocket#read): modify typo.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-08 07:00:23 +00:00
knu 7f326a3988 * lib/tempfile.rb: a tempfile must be created with mode 0600.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-05 17:19:28 +00:00
aamine afb3a0cff1 aamine
* lib/net/http.rb (HTTP#request_by_name): arg order changes.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-03 19:18:17 +00:00
aamine 9e79454b3d aamine
* lib/net/http.rb (HTTP#request_by_name): bug fix.
* lib/net/http.rb: does not write Connection: by default.
* lib/net/protocol.rb: "start" for started protocol is an error.
* lib/net/protocol.rb: "finish" for finished protocol is an error.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-03 19:03:16 +00:00
aamine fa20d931bc aamine
* lib/net/http.rb: new method HTTP#request_by_name (test)
* lib/net/http.rb: new class HTTPGenericRequest


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-03 18:13:13 +00:00
knu fc1f22d5a8 * lib/mkmf.rb: distclean should remove mkmf.log as well.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-03 15:02:20 +00:00
matz f7ac4f227d * eval.c (rb_eval_string_wrap): should push frame (and adjust
cbase) before wrapped eval.

* eval.c (rb_eval_cmd): ditto.

* eval.c (eval): should update ruby_class always after all.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-03 09:37:08 +00:00
matz 08eef47e5b credit rb_name_error() fix to Nobuyoshi Nakada.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-03 07:29:00 +00:00
shugo 604a8f1883 * eval.c (block_pass): do not change wrapper information.
* eval.c (rb_yield_0):  preserve wrapper information.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-03 05:57:16 +00:00
shugo 066cfdc133 * error.c (rb_name_error): raise NameError instead of LoadError.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-03 05:52:20 +00:00
matz ffe1cf575e * error.c (exc_exception): clone the receiver exception instead of
creating brand new exception object of the receiver.

* eval.c (rb_eval_string_wrap): extend new ruby_top_self, not
  original self.

* eval.c (rb_eval_cmd): respect ruby_wrapper if set.

* eval.c (eval): do not update ruby_class unless scope is not
  provided.

* eval.c (eval): preserve wrapper information.

* eval.c (proc_invoke): ditto.

* eval.c (block_pass): ditto.

* parse.y (void_expr): too much warnings for void context
  (e.g. foo[1] that can be mere Proc call).

* error.c (rb_name_error): new function to raise NameError with
  name attribute set.

* eval.c (rb_f_missing): set name and args in the exception
  object. [new]

* error.c (name_name): NameError#name - new method.

* error.c (nometh_args): NoMethodError#args - new method.

* lex.c (rb_reserved_word): lex_state after tRESCUE should be
  EXPR_MID.

* gc.c (add_heap): allocation size of the heap unit is doubled for
  each allocation.

* dir.c (isdelim): space, tab, and newline are no longer
  delimiters for glob patterns.

* eval.c (svalue_to_avalue): new conversion scheme between single
  value and array values.

* eval.c (avalue_to_svalue): ditto.

* eval.c (rb_eval): REXPAND now uses avalue_to_svalue(), return
  and yield too.

* eval.c (rb_yield_0): use avalue_to_svalue().

* eval.c (proc_invoke): Proc#call gives avaules, whereas
  Proc#yield gives mvalues.

* eval.c (bmcall): convert given value (svalue) to avalue.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-02 08:46:28 +00:00
keiju cc13bb43bc * lib/matrix.rb: resolve 'ruby -w' warnings.
* lib/irb/locale.rb: resolve 'ruby -w' warnings.
* lib/irb/multi-irb.rb: resolve 'ruby -w' warnings.
* lib/irb/ruby-lex.rb: fix problem for "\\M-\\..." and "\\C-\\..."
  and resolve 'ruby -w' warnings.
* lib/irb/ruby-token.rb: fix typo
* lib/shell/command-processor.rb: resolve 'ruby -w' warnings.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-27 15:35:04 +00:00
aamine 37b3f674a7 sorry, check in miss.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-26 23:51:16 +00:00
aamine c664027a34 aamine
* lib/net/pop.rb: new methods POP3.auth_only, POP3#auth_only
* lib/net/http.rb: HTTP.Proxy returns self if ADDRESS is nil.
* lib/net/protocol.rb: new method ProtocolError#response
* lib/net/protocol.rb,smtp.rb,pop.rb,http.rb: add document.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-26 23:49:21 +00:00
knu c0648ecc85 * ext/readline/readline.c (readline_event): a non-void function
should return a value.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-23 09:30:42 +00:00
eban 2cf4fce053 * ext/socket/socket.c (ruby_connect): workaround for the setup of
Cygwin socket.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-22 14:44:44 +00:00
keiju cdabb04b44 * lib/irb/locale.rb: fix for require "kconv" problem
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-22 14:16:25 +00:00
matz def42c9a0c * eval.c (rb_yield_0): no mvalue_to_svalue conversion here.
* eval.c (massign): takes svalue, convert it to mvalue inside.

* eval.c (rb_eval): parameters for yield/return are always
  svalues now.

* eval.c (svalue_to_mvalue): more strict conversion.

* eval.c (mvalue_to_svalue): ditto.

* st.c (new_size): prime hash size enabled.

* ext/socket/socket.c (Init_socket): SO_* constants added.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-22 09:12:24 +00:00
eban ef8e0b4dff * gc.c (rb_setjmp): avoid GCC 3.0 warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-19 15:42:00 +00:00
knu 0c92a85e6a * ext/readline/readline.c: add new methods:
Readline::completion_append_character and
  Readline::completion_append_character=.k


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-19 09:21:38 +00:00
matz 058888bd38 * eval.c (svalue_to_mvalue): new function to convert from svalue
to mvalue. [experimental]

* eval.c (mvalue_to_svalue): new function to convert from mvalue
  to svalue.

* eval.c (rb_eval): use mvalue_to_svalue().

* eval.c (rb_yield_0): use mvalue_to_svalue().

* eval.c (proc_invoke): proper mvalue handling.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-19 07:33:10 +00:00
matz 9d51cf8a6a * eval.c (rb_f_require): searches ".rb" and ".so" at the same
time.  previous behavior (search ".rb", then ".so") has a
  security risk (ruby-bugs#PR140).

* array.c (rb_ary_to_ary): new function to replace internal
  rb_Array(), which never calls to_a, but to_ary (rb_Array() might
  call both). [new]

* regex.c (PUSH_FAILURE_POINT): push option status again.

* regex.c (re_compile_pattern): avoid pushing unnecessary
  option_set.

* eval.c (rb_load): tainted string is OK if wrapped *and*
  $SAFE >= 4.

* eval.c (rb_thread_start_0): should not nail down higher blocks
  before preserving original context (i.e. should not alter
  original context).

* eval.c (proc_yield): new method equivalent to Proc#call but no
  check for number of arguments. [new]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-19 04:35:17 +00:00
knu 6aa71d4c80 * dir.c (Init_Dir): add a new method File::fnmatch? along with
File::Constants::FNM_*.  While I am here, FNM_NOCASE is renamed
  to FNM_CASEFOLD which is commonly used by *BSD and GNU libc.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-13 10:51:39 +00:00
matz 39fb2a27ab * eval.c (method_eq): new method Method#==. [new]
* gc.c (STR_NO_ORIG): STR_NO_ORIG value was different between
  string.c and gc.c

* eval.c (rb_eval): should convert *non-array at the end of
  arguments by using Array().

* hash.c (ruby_setenv): readline library leaves their environment
  strings uncopied.  "free" check revised.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-12 05:31:47 +00:00
knu 83b2db9ea7 * lib/mkmf.rb: target_prefix is only for installation, not for
build.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-12 05:25:04 +00:00
eban c88531e4b9 * confgure.in: add RUBY_CANONICAL_BUILD.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-11 05:31:17 +00:00
usa a5c0e5a382 * ext/extmk.rb.in: Use -F and -T for mswin32 because cl.exe doesn't support -o officially and cl.exe considers that *.cc and *.cxx are OBJs.
* lib/mkmf.rb: ditto.

* win32/Makefile.sub: Use del instead of rm. All these changes are derived from Nobuyoshi Nakada's patch. Thanks.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-09 07:41:44 +00:00
matz 46e8ae1104 * gc.c (Init_stack): avoid __builtin_frame_address(2) to retrieve
stack bottom line.

* st.c (numhash): should shuffle bits by dividing by prime number.

* eval.c (rb_eval): multiple assignment behavior fixed, which
  results "*a = nil" makes "a == []" now.

* eval.c (rb_f_require): should set SCOPE_PUBLIC before calling
  dln_load().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-08 14:20:58 +00:00
matz 4c6b76c1e4 * parse.y (yylex): exclude kDO_BLOCK too much by false condition.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-07 08:29:59 +00:00
keiju 85d105cf8c * lib/sync.rb: bug fix if obj.initialize has parameters when
obj.extend(Sync_m)

* lib/mutex_m.rb: modified bit


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-06 14:19:33 +00:00
matz f0ccffd530 * eval.c (rb_load): should check if tainted even when wrap is
specified.

* regex.c (re_compile_pattern): too much optimization for the
  cases like /(.|a)b/.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-06 07:40:31 +00:00
matz 7c9c33e9ad * parse.y (aref_args): "*arg" should always be expanded by REXPAND.
* variable.c (fc_i): removed vast string allocation.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-06 06:42:23 +00:00
matz b12904e85f * error.c (Init_Exception): NameError went under StandardError,
and NoMethodError went under NameError.

* parse.y (rb_intern): non identifier symbols should be
  categorized as ID_JUNK. [new]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-05 07:50:59 +00:00
matz d6c60dbf6d * variable.c (rb_mod_const_at): use hash table as internal
data. [new]

* variable.c (rb_mod_const_of): ditto.

* variable.c (rb_const_list): new function to convert internal
  data (hash table) to array of strings.

* eval.c (rb_mod_s_constants): data handling scheme has changed.

* eval.c (rb_add_method): should not call rb_secure(), for
  last_func may not be set.

* io.c (rb_io_ctl): ioctl should accept any integer within C long
  range.

* marshal.c (r_object): wrong type check for modules.

* marshal.c (w_object): should not dump anonymous classes/modules.

* io.c (rb_open_file): use rb_file_sysopen_internal() if the 3rd
  argument (permission flags) is given. [new, should be backported?]

* io.c (rb_io_mode_binmode): mode string (e.g. "r+") to flags to
  open(2).

* eval.c (rb_eval): NODE_REXPAND expand an array of 1 element as
  the element itself. [new, should be backported?]

* parse.y (ret_args): should treat "*[a]" in rhs expression as
  "a", not "[a]".

* regex.c (re_compile_pattern): should push option modifier at the
  right place.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-05 07:19:39 +00:00
eban ac376af4f4 * ext/etc/extconf.rb: use egrep_cpp.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-05 04:43:17 +00:00
wakou bfd441db8f * lib/shellwords.rb: don't destroy argument.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-03 19:25:07 +00:00
shugo 7dc25230be * lib/cgi/session.rb: don't use module_function for Class.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-02 14:19:37 +00:00
keiju 3c024ba5e2 * irb messages: fix typos.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-01 15:26:47 +00:00
matz 23f89a8932 * hash.c (replace_i): ignore when key == Qundef.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-01 09:38:30 +00:00
matz da548b67f5 * parse.y (call_args2): confusion with list_append() and
list_concat() was fixed.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-01 07:52:34 +00:00
matz 353650e6b4 * parse.y (yylex): fixed 'print CGI::bar() {}, "\n"' syntax
breakage, adding new lex_state status.  sigh. [new]

* file.c (rb_file_s_unlink): should not allow if $SAFE >= 2.

* range.c (Init_Range): define "to_ary".


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-01 06:47:32 +00:00
eban e8fb16c70f * configure.in: use waitpid on mingw32.
* ext/dbm/extconf.rb: include <ndbm.h>, not <gdbm.h>.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-01 02:25:28 +00:00
eban ac41cd6844 * mkconfig.rb, ext/configsub.rb: VERSION -> RUBY_VERSION.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-05-31 04:40:37 +00:00
usa a0047c7d89 * win32/dir.h: re-add.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-05-30 23:02:54 +00:00
knu 2c537562df * configure.in: default --with-libc_r to `no' until the problem is
fixed. (FreeBSD only)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-05-30 16:29:32 +00:00
matz abfaac7a6c * ruby.c (proc_options): unexpected SecurityError happens when -T4.
* regex.c (re_compile_pattern): * \1 .. \9 should be
  backreferences always.

* regex.c (re_match): backreferences corresponding to
  unclosed/unmatched parentheses should fail always.

* string.c (rb_str_cat): use rb_str_buf_cat() if possible. [new]

* string.c (rb_str_append): ditto.

* string.c (rb_str_buf_cat): remove unnecessary check (type,
  taint, modify) to gain performance.

* string.c (rb_str_buf_append): ditto.

* string.c (rb_str_buf_new): buffering string function. [new]

* string.c (rb_str_buf_append): ditto.

* string.c (rb_str_buf_cat): ditto.

* time.c (make_time_t): local time adjustment revised.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-05-30 09:12:34 +00:00
eban 032825472b * configure.in: remove unnecessary AC_CANONICAL_BUILD
* defins.h: #define HAVE_SETITIMER on Cygwin(bug fixed).
* ruby.c: use relative path from LIBRUBY_SO.
* ruby.c: don't use -mwin32 option on Cygwin.
* cygwin/GNUmakefile.in: ditto.
* ext/sdbm/_sdbm: ditto.
* ext/tcltklib/extconf.rb: ditto.
* ext/tcltklib/stubs.c: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-05-28 16:07:34 +00:00
usa e83171c4c4 * ext/extconf.rb.in: make the priority of the make rule of .c higher than .C .
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-05-28 13:25:34 +00:00
knu 4407373ef1 * dir.c (glob_helper): teach has_magic() to handle flags and get
glob_helper to properly support FNM_NOESCAPE.

* dir.c (fnmatch): fix a bug when FNM_PATHNAME and FNM_PERIOD are
  specified at the same time.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-05-27 17:24:24 +00:00