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

16429 Коммитов

Автор SHA1 Сообщение Дата
akr 758f9510a6 use IO::WaitWritable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-19 12:45:40 +00:00
akr c4049f4cb6 * io.c (rb_mWaitReadable): defined.
(rb_mWaitWritable): defined.
  (io_getpartial): extend IO::WaitReadable on EWOULDBLOCK and EAGAIN.
  (rb_io_write_nonblock): extend IO::WaitWritable on EWOULDBLOCK and
  EAGAIN.

* error.c (make_errno_exc): extracted from rb_sys_fail.
  (rb_mod_sys_fail): new function.

* include/ruby/ruby.h (rb_mod_sys_fail): declared.
  (rb_mWaitReadable): declared.
  (rb_mWaitWritable): declared.

* ext/socket/init.c (rsock_s_recvfrom_nonblock): extend
  IO::WaitReadable on EWOULDBLOCK and EAGAIN.
  (rsock_s_accept_nonblock): extend IO::WaitReadable on EWOULDBLOCK,
  EAGAIN, ECONNABORTED and EPROTO.

* ext/socket/socket.c (sock_connect_nonblock): extend IO::WaitWritable
  on EINPROGRESS.

* ext/socket/ancdata.c (bsock_sendmsg_internal): extend
  IO::WaitWritable on EWOULDBLOCK and EAGAIN.
  (bsock_recvmsg_internal): extend IO::WaitReadable on EWOULDBLOCK and
  EAGAIN.

* ext/openssl/ossl_ssl.c (ossl_ssl_read_internal): raise SSLError
  extended by IO::WaitReadable/IO::WaitWritable on
  SSL_ERROR_WANT_READ/SSL_ERROR_WANT_WRITE.

* ext/openssl/ossl.c (ossl_make_error): extracted from ossl_raise.
  (ossl_exc_new): new function.

* ext/openssl/ossl.h (ossl_exc_new): declared.

* lib/net/protocol.rb (rbuf_fill): rescue IO::WaitReadable and
  IO::WaitWritable.

  [ruby-core:22539], [ruby-dev:38140] 



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-19 11:40:38 +00:00
nobu b7800329d3 * configure.in (RUBY_CHECK_SIZEOF): allows qualified name.
* configure.in (RUBY_REPLACE_TYPE): checks more strictly.

* configure.in (struct stat.st_size, struct stat.st_blocks),
  (struct stat.st_ino): check for size.

* lib/mkmf.rb (check_sizeof): allows qualified name.

* file.c (rb_stat_ino, rb_stat_blocks): check by size.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23005 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-19 09:49:51 +00:00
akr 0ff55a1bd2 pattern refined for ldd on OpenBSD.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23004 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-18 12:19:52 +00:00
takano32 867cd89920 * ext/socket/ancdata.c: not use pktinfo.ipi_spec_dst if not defined
* ext/socket/extconf.rb: define HAVE_IPI_SPEC_DST


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-18 08:04:17 +00:00
kazu a8aa5c44fc * test/test_syslog.rb (TestSyslog#test_open): check
param after block again. because detect not to call block.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-18 08:01:48 +00:00
kazu 950bd573f6 * test/test_syslog.rb (TestSyslog#test_open): check
block parameter in block. [ruby-dev:38180]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-18 07:40:26 +00:00
nobu 402b8f5de9 * error.c (report_bug): rb_bug can be caused by extension
libraries.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-18 03:48:03 +00:00
svn d0182b81b3 * 2009-03-18
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-17 17:43:53 +00:00
seki 998217fb3d * lib/drb/drb.rb (open_server_inaddr_any): fixed multiple network
families problem. a patch from Charl Matthee at [ruby-core:21033].



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-17 17:43:48 +00:00
nobu 39dfe91909 * tool/make-snapshot (package): creates .revision.time and passes
CHDIR to create prerequisite files.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-17 12:42:56 +00:00
akr 616932fbdb rdoc update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-17 10:27:17 +00:00
akr e36cfc749f rdoc update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-17 10:14:01 +00:00
knu 6712cca3b5 * enumerator.c (Enumerator#{each_,}{with_index,with_object}): Fix
a bug where any parameter but the first one is dropped even if
  multiple values are yielded with. [Bug #1198]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-17 09:07:18 +00:00
nobu 929a85f60e * tool/ifchange: removed newer substitution syntax.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-17 06:50:33 +00:00
akr c5501b8b19 make ./goruby -e 'p "abc".gs(/a/) { $& }' prints "abc".
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-17 06:40:20 +00:00
akr a28532dcf3 * lib/pathname.rb (Pathname#sub): set $~ in block.binding.
[ruby-dev:38173]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-17 05:26:15 +00:00
nobu 27a39b8ffe * win32/Makefile.sub (config.h): added RUBY_COREDLL.
* ext/dl/handle.c (rb_dlhandle_initialize): returns msvcrt if libc
  or RUBY_COREDLL is given.  [ruby-core:22828]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-17 04:48:03 +00:00
akr e3cb6518d1 rdoc update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-17 01:37:57 +00:00
nobu 22cde7b682 * dir.c, dln.c, parse.y, re.c, ruby.c, sprintf.c, strftime.c,
string.c, util.c, variable.c: use strlcpy, memcpy and snprintf
  instead of strcpy, strncpy and sprintf.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-17 01:29:17 +00:00
svn ea9628c3bc * 2009-03-17
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-17 01:15:38 +00:00
nobu f797bdae70 * ext/dl: made indent style insistent.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-17 01:15:35 +00:00
nobu 1b6808913a * test/dl/test_win32.rb (Win32API): enclosed by DL::TestWin32.
[ruby-core:22827]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-16 08:15:10 +00:00
nobu f86cd0d4c2 * ext/tk/tcltklib.c (eventloop_sleep, lib_eventloop_core),
(lib_watchdog_core): tv_usec is not time_t.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-16 07:37:24 +00:00
nobu c569163e9e * process.c (rb_spawn_internal): suppressed a warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22975 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-16 06:22:37 +00:00
nobu 2bb561ea5f * common.mk (REVISION_H): keeps timestamp of revision.h.
[ruby-core:22900]

* tool/ifchange, win32/ifchange.bat: extended --timestamp option.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-16 03:30:01 +00:00
nobu 40819d4599 * Makefile.in, common.mk, win32/Makefile.sub: added preprocessing rules.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-16 00:29:00 +00:00
akr 7b713539ee updated.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-15 05:01:48 +00:00
nobu 0596555042 * test/minitest/test_mini_test.rb: fixed tests depending on the
detail of floating point representation.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-15 03:34:18 +00:00
nobu d85689f5cb * lib/rubygems/installer.rb (Gem::Installer#shebang): fix for env
shebang.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-15 03:01:39 +00:00
nobu 375258ed98 * include/ruby/ruby.h ({RSTRING,RBIGNUM}_EMBED_LEN_MAX): made int.
* include/ruby/ruby.h (OBJ_{TAINTED,UNTRUSTED,FROZEN}): return int.

* include/ruby/encoding.h (ENC_CODERANGE): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-15 02:17:48 +00:00
nobu afdeb2d35e * include/ruby/ruby.h ({RSTRING,RBIGNUM}_EMBED_LEN_MAX): made int.
* include/ruby/ruby.h (OBJ_{TAINTED,UNTRUSTED,FROZEN}): return int.

* include/ruby/encoding.h (ENC_CODERANGE): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-15 02:15:19 +00:00
nobu 8c8f85ed4f * string.c (rb_hash_uint, rb_hash_start, rb_hash_end): use VALUE
rather than unsigned int.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-15 02:11:45 +00:00
nobu 731504b4d3 * ruby.c (load_file_internal): stop the timer thread before exec.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-15 02:00:15 +00:00
nobu 28398e91f1 * common.mk (.y.c): use SRC_FILE which contains slashes instead of
backslashes.  [ruby-core:22891]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-15 00:17:21 +00:00
nobu 02136ebbb5 * common.mk (srcs-ext): creates ext/dl/callback/callback.c also.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-14 23:26:11 +00:00
nobu dbb66effef * test/ruby/test_float.rb (TestFloat#test_to_s): precision was
increased.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-14 19:24:27 +00:00
nobu 34877b581d * process.c (SAVED_GROUP_ID, p_gid_switch): should be rb_gid_t.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-14 18:30:00 +00:00
akr f414bd65ae * string.c (rb_str_subpat): accept capture name.
(rb_str_aref): follow above change.
  (rb_str_aref_m): pass the 2nd argument to rb_str_subpat.
  (rb_str_subpat_set): accept capture name.
  (rb_str_aset): follow above change.
  (rb_str_partition): ditto.
  (rb_str_aset_m): pass the 2nd argument to rb_str_subpat_set.

* include/ruby/intern.h (rb_reg_backref_number): declared.

* re.c (rb_reg_backref_number): defined.

  [ruby-core:21057]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-14 18:04:21 +00:00
nobu f621b32e58 * proc.c (bmcall): should not uninitialized variable. a patch from
pegacorn at [ruby-dev:38169].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-14 17:09:33 +00:00
nobu 4de12b6ae9 * util.c (ruby_scan_oct, ruby_scan_hex): use size_t.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-14 09:25:20 +00:00
nobu eca77cc85c * proc.c (rb_proc_call, bmcall): commit miss.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-14 09:19:55 +00:00
nobu 4fc5c89700 * proc.c (rb_proc_call, rb_node_arity, bmcall, curry): checks
overflow.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-14 09:18:09 +00:00
nobu 886214bc01 * proc.c (rb_proc_call): checks overflow.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-14 09:05:09 +00:00
nobu eb89ad23cb * proc.c (rb_proc_arity): commit miss.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-14 09:03:48 +00:00
nobu 07167378cb * proc.c (rb_proc_parameters): unnamed_parameters() expects int
not VALUE.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-14 08:59:12 +00:00
nobu 1f43321991 * util.c (ruby_each_words): assume no string exceeds INT_MAX.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-14 08:54:21 +00:00
akr e368a2e158 * process.c (rb_spawn_internal): use int variable for status.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-14 06:59:55 +00:00
akr ba8fbae364 assert connects doesn't raise.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-14 06:58:50 +00:00
akr ec5e44f2c7 * process.c (rb_f_system): use rb_pid_t for pid.
(rb_spawn_internal): local variable renamed.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-14 05:46:43 +00:00