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

4425 Коммитов

Автор SHA1 Сообщение Дата
matz 989b0a6d1e * parse.y (f_larglist): allow bv_decl at the end of lambda
argument list.  [EXPERIMENTAL]

* parse.y (new_bv_gen): allow local variable shadowing, with
  warning in verbose mode.

* ext/socket/socket.c (ruby_connect): break immediately if a
  socket is non-blocking.  [ruby-talk:111654]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-28 02:33:28 +00:00
matz bd3404ced0 * gc.c (obj_free): make message formant consistent with one from
gc_mark().  [ruby-talk:149668]

* sprintf.c (quad_t): prepare quad_t as well.  [ruby-talk:149668]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-27 14:30:09 +00:00
kou 1dbd5e6a3e * sample/rss/tdiary_plugin: removed. because the plugin
is imported in the tDiary plugin packages.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-27 13:16:32 +00:00
aamine bff7359065 * lib/fileutils.rb (cd): follow :noop option change. (This patch is contributed by Doug Kearns)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-27 10:12:08 +00:00
matz 759a63b6a3 * parse.y (lambda): Perl6 style -> lambda expression. [NEW]
[VERY EXPERIMENTAL]

* gc.c (id2ref): must not assign pointers to long int.  use
  LONG_LONG instead if SIZEOF_LONG < SIZEOF_VOIDP.
  [ruby-talk:149645]

* ruby.h: use LONG_LONG to simplify the change.
  [ruby-talk:149645]

* dir.c (dir_each): rewinddir(3) before iteration.
  [ruby-talk:149628]

* eval.c (rb_f_throw): replace all '0x%lx' by '%p'.
  [ruby-talk:149553]

* missing/vsnprintf.c (BSD_vfprintf): '%p' need to handle 64bit
  size pointer.  [ruby-talk:149553]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-27 07:27:19 +00:00
aamine 57c8f59761 * ext/ripper/lib/ripper/sexp.rb: new method Ripper.sexp_raw.
* ext/ripper/lib/ripper/sexp.rb (Ripper.sexp): returns more readable tree.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8841 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-26 13:42:49 +00:00
aamine bf96629711 * lib/net/http.rb: merge a patch contributed by Daniel Berger, with some modification. (RubyForge #2128)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-26 13:05:31 +00:00
matz 5dab497052 * ruby.h: support LLP64 model. [ruby-talk:149524]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-26 09:16:37 +00:00
gotoyuzo 09e5e42d3e * ext/openssl/openssl_missin.c: include <openssl/engine.h> before
<openssl/x509_vfy.h> to avoid compilation error of mswin32.
  suggested by NAKAMURA Usaku.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-26 03:59:39 +00:00
usa 528f4c66dd * win32/win32.[ch]: (rb_w32_vsnprintf, rb_w32_snprintf): removed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-25 14:50:12 +00:00
nobu 9b4ddc1a01 * {bcc32,win32,wince}/Makefile.sub: moved CPPFLAGS only for ruby
source to XCFLAGS.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-25 12:31:21 +00:00
nobu a6df88f00b * common.mk: Borland MAKE doesn't look for file names which have paths
from VPATH.  fixed: [ruby-dev:26604]

* ruby.h (NORETURN, DEPRECATED): moved just after config.h.

* {win32,wince}/Makefile.sub: vsnprintf() is in missing now.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-25 12:29:37 +00:00
matz f65273b419 * bignum.c (rb_big_eq): reduce isnan(). [ruby-dev:26600]
* numeric.c (flo_eq, flo_gt, flo_ge, flo_lt, flo_le): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-25 07:08:14 +00:00
nagai b535e9b004 * ext/tk/lib/multi-tk.rb: fix en-bugged part in the last commit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8830 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-25 05:11:19 +00:00
gotoyuzo b502b16eb6 * ext/openssl/ossl_engine.c (ossl_engine_s_load): should check
OPENSSL_NO_STATIC_ENGINE.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-23 07:50:17 +00:00
nobu 80914a2666 * eval.c (rb_fd_select): the all three fd_sets must be long enough for
select.  fixed: [ruby-talk:149059]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-23 02:46:41 +00:00
nobu 6524f34a26 * sprintf.c (rb_vsprintf, rb_sprintf): new functions return new String,
using missing/vsnprintf.c.  [ruby-dev:26580]

*  missing/vsnprintf.c: made the output changeable.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-23 01:02:18 +00:00
kou b2270e5535 * lib/rss/rss.rb: moved copyright description to lib/rss.rb.
* lib/rss.rb: added for convenience.

* sample/rss/re_read.rb: added #to_s sample.

* sample/rss/blend.rb: use 'require "rss"' instead of 'require "rss/*"'.
* sample/rss/list_description.rb: ditto.
* sample/rss/rss_recent.rb: ditto.
* sample/rss/tdiary-plugin/rss-recent.rb: ditto.

* sample/rss/tdiary-plugin/rss-recent.rb: 0.0.6 -> 0.0.7.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-22 06:14:48 +00:00
kou be7999fd3d * lib/rss/parser.rb (RSS::Parser#initialize): accept HTTP/FTP
URI and local file path too.

* test/rss/test_parser.rb (RSS::TestParser#test_parse): test
  for the above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-22 05:41:33 +00:00
nagai 17743ce0a8 * ext/tk/tkutil/tkutil.c (tk_conv_args): forget to revert
thread_critical and gc_disable when raise ArgumentError.
* ext/tk/lib/remote-tk.rb: RemoteTkIp doesn't need to include TkUtil.
* ext/tk/tcltklib.c: add TclTkIp#has_mainwindow? method.
* ext/tk/lib/tk.rb: add Tk.has_mainwindow? method.
* ext/tk/lib/multi-tk.rb: add MultiTkIp#has_mainwindow? method.
* ext/tk/lib/remote-tk.rb: add RemoteTkIp#has_mainwindow? method.
* ext/tk/lib/multi-tk.rb: slave IP fail to exit itself when $SAFE==4.
* ext/tk/lib/multi-tk.rb: remove constants from MultiTkIp module to
  avoid access from external.
* ext/tk/lib/multi-tk.rb: check_root flag is ignored on slave IPs'
  mainloop.
* ext/tk/lib/multi-tk.rb: hang-up Tk.mainloop called on a slave IP
  with $SAFE==4.
* ext/tk/lib/multi-tk.rb: MultiTkIp#bg_eval_proc doesn't work
  properly.
* ext/tk/lib/multi-tk.rb: add MultiTkIp#set_cb_error(proc) and
  cb_error(exc) to log errors at callbacks on safe slave IPs.
* ext/tk/lib/multi-tk.rb: fail to get an available slave IP object
  when call Tk.mainloop in the block which is given to new_* method,
  because cannot finish initialize while the root widget is alive.
* ext/tk/lib/multi-tk.rb: fail to control a slave IP when Tk.mainloop
  runs on the IP.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-21 22:05:04 +00:00
naruse 0580cf2696 * ext/nkf/nkf-utf8/{nkf.c,utf8tbl.c,config.h}:
import 1.76
  [ruby-dev:26592] nkf constification


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-21 16:13:08 +00:00
usa c7bdb0d8b8 * io.c (S_ISREG): need to define S_ISREG before it is used first.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-20 10:21:16 +00:00
ocean 2b2256217e * io.c (wsplit_p): patch for the environment where
fcntl(F_GETFL, O_NONBLOCK) is not supported. in that case,
  set FMODE_WSPLIT without fcntl check. [ruby-dev:26566]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-20 09:46:57 +00:00
akr 74e1cc9e55 * io.c (rb_io_ctl): update FMODE_WSPLIT_INITIALIZED and FMODE_WSPLIT
by F_SETFL.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-20 09:14:30 +00:00
matz 2201229b4a * variable.c (rb_class_path): need to adjust snprintf() len for
teminating NUL.  [ruby-dev:26581]

* error.c (syserr_initialize): don't use str before StringValue()
  check.  [ruby-dev:26579]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-20 01:08:13 +00:00
ocean 81ad8ec096 * ext/socket/socket.c: sorry, BeOS also uses HAVE_CLOSESOCKET,
so reverted.

* ext/socket/extconf.rb: should not define HAVE_CLOSESOCKET
  on windows.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-19 19:04:46 +00:00
ocean aee718d32a no message
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-19 18:26:49 +00:00
ocean a41331918f * ext/socket/socket.c: should not undef close on win32.
it's defined to rb_w32_close, otherwise handle leaks.
  [ruby-Bugs-2131]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-19 18:18:51 +00:00
matz 7af1a11438 * error.c (syserr_initialize): add 1 byte for snprintf() size for
NUL at the end.  [ruby-dev:26574]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-19 14:59:01 +00:00
matz 30434d4078 * error.c (syserr_initialize): need to allocate an additional byte
for NUL at the end.  [ruby-dev:26574]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-19 13:52:42 +00:00
matz 2031602787 * signal.c (trap): remove sigexit(); handle "EXIT" via sig_exec().
[ruby-dev:26440]

* io.c (rb_io_inspect): replace sprintf() with "%s" format all
  over the place by snprintf() to avoid integer overflow.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-19 08:31:04 +00:00
ocean 9042a601c8 * ext/tk/tcltklib.c: rbtk_eventloop_depth is used as int.
* ext/tk/tcltklib.c: rbtk_pending_exception is tested with
  NIL_P, so should assign Qnil instead of 0 (Qfalse).

* ext/tk/tcltklib.c (ip_invoke_real): fixed memory leak when
  ip is deleted.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-19 05:12:52 +00:00
nagai 4826eaecf6 * ext/tk/lib/tk/variable.rb: For symmetry, add TkVariable#string. It
returns a string even if the default value type of the TkVariable
  object is not "string".


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-19 04:24:05 +00:00
ocean c2eeec8fd4 * eval.c (rb_call0): make the pointer to NODE volatile
instead of NODE itself.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-18 12:41:18 +00:00
akr 06f6c2d355 * eval.c (rb_call0): make body volatile to avoid possible optimization
problem.
  [ruby-dev:26195]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-18 05:43:13 +00:00
nobu 5e69b52014 * ext/io/wait/wait.c: wrong backport from trunk, and compile error on
platforms fd_set is not a bit set.  fixed: [ruby-dev:26562]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-18 03:23:47 +00:00
akr 8c2e1ce91c * rubyio.h (FMODE_WSPLIT, FMODE_WSPLIT_INITIALIZED): new constant.
* io.c (wsplit_p): new function.
  (io_fflush): split writing data by PIPE_BUF if wsplit_p is true in
  multi-threaded mode.
  (io_fwrite): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-18 01:00:23 +00:00
naruse c065b233c6 * ext/nkf/nkf-utf8/nkf.c: import nkf.c 1.73
fix: TestKconv 1F


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-17 20:03:35 +00:00
nobu 3db45ca3cc * ext/io/wait/extconf.rb, ext/io/wait/wait.c: Win32 platforms support.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-17 04:47:38 +00:00
nobu 99ce5395af * enumerator.c (Init_Enumerator): wrong argument specs.
[ruby-core:05481]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-16 14:43:34 +00:00
ocean c6a782c14e * win32/win32.[hc]: constified socket functions. [ruby-dev:26553]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-16 06:59:05 +00:00
nobu 2bfa23f034 * lib/rdoc/parsers/parse_c.rb (handle_class_module): handle a
module enclosed in a built-in module.  fixed: [ruby-talk:148239]

* lib/rdoc/parsers/parse_c.rb (find_body): allow macros as methods.

* lib/rdoc/parsers/parse_c.rb (find_call_seq): allow :nodoc: modifier
  in C.  [ruby-core:04572]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-15 15:00:11 +00:00
nobu fd0f36a4a8 * enumerator.c (Init_Enumerator): use an internal directly.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-15 14:20:19 +00:00
gotoyuzo 8db529ca2b * lib/webrick/server.rb (WEBrick::GenericServer#accept_client):
sockets should be non-blocking mode. [ruby-dev:26405]

* lib/webrick/utils.rb (WEBrick::Utils.set_non_blocking): new method.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-14 22:59:09 +00:00
nobu d725e6666a * enum.c (enumeratorize): create new enumerator for current method if
no block is given.

* enumerator.c: moved from ext/enumerator.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-14 15:15:22 +00:00
ocean 59970fde60 * win32/win32.c (rb_w32_strerror): should return correct message
for ENAMETOOLONG and ENOTEMPTY. (bcc32) [ruby-dev:26533]

* win32/win32.c (rb_w32_strerror): stripped CR LF on the tail.
  (bcc32) [ruby-dev:26533]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-14 09:33:52 +00:00
nobu 6fc0148b27 * LEGAL (ext/nkf/nkf-utf8): updated from nkf1.7 to nkf-utf8.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-13 15:46:37 +00:00
nobu 032248d337 * parse.y: remove static variables. [ruby-dev:26530]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-13 13:44:21 +00:00
ocean 1ee65ab7bb add ML number
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-13 10:43:54 +00:00
ocean 80b0773d33 * win32/win32.c (rb_w32_mkdir): should set EEXIST (not EACCES)
if file or directory already exists. (bcc32)

* win32/win32.c (rb_w32_rmdir): should set ENOTDIR (not EINVAL)
  if it is not directory. (bcc32, win32)

* win32/win32.c (rb_w32_rmdir, rb_w32_unlink): restore
  FILE_ATTRIBUTE_READONLY flag on function failure.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-13 10:40:06 +00:00