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

15433 Коммитов

Автор SHA1 Сообщение Дата
akr 0dd41d0d78 * ext/socket/socket.c (init_unix_addrinfo): don't return a value.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-07 22:53:41 +00:00
akr ccdcc971f6 * lib/open-uri.rb (OpenURI.redirectable?): reverted https redirection.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-07 22:33:00 +00:00
akr 3a0aa7f8d8 updated.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-07 22:21:40 +00:00
akr d45c4a8107 * lib/test/unit/assertions.rb (assert_no_match): don't count up as two
assertions.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-07 15:33:17 +00:00
akr 3802c43ea1 * ext/socket/socket.c (addrinfo_getnameinfo): use NI_DGRAM if socktype
is SOCK_DGRAM.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-07 15:27:09 +00:00
svn 0f94c670f7 * 2009-01-08
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-07 15:21:47 +00:00
akr 69d908a10c * ext/socket/socket.c (host_str): add flags_ptr argument to specify
AI_NUMERICHOST if host is numeric form.
  (port_str): add flags_ptr argument to specify AI_NUMERICSERV if port
  is numeric form.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-07 15:21:43 +00:00
nobu 0e9023acd0 * test/rubygems/test_gem.rb (test_self_user_home_user_drive_and_path): removed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-07 14:33:17 +00:00
akr 55b2bf4dec * ext/socket/socket.c (rb_cAddrInfo): new class AddrInfo.
(s_recvfrom): return AddrInfo as address.
  (s_recvfrom_nonblock): ditto.
  (sock_accept): ditto.
  (sock_accept_nonblock): ditto.
  (sock_sysaccept): ditto.
  (bsock_send): accept AddrInfo as address argument.
  (sock_connect): ditto.
  (sock_connect_nonblock): ditto.
  (sock_bind): ditto.
  (sock_s_unpack_sockaddr_in): ditto.
  (sock_s_unpack_sockaddr_un): ditto.
  (bsock_local_address): new method BasicSocket#local_address.
  (bsock_remote_address): new method BasicSocket#remote_address.
  (addrinfo_initialize): new method AddrInfo#initialize.
  (addrinfo_inspect): new method AddrInfo#inspect.
  (addrinfo_afamily): new method AddrInfo#afamily.
  (addrinfo_pfamily): new method AddrInfo#pfamily.
  (addrinfo_socktype): new method AddrInfo#socktype.
  (addrinfo_protocol): new method AddrInfo#protocol.
  (addrinfo_to_sockaddr): new method AddrInfo#to_sockaddr.
  (addrinfo_canonname): new method AddrInfo#canonname.
  (addrinfo_ip_p): new method AddrInfo#ip?.
  (addrinfo_ipv4_p): new method AddrInfo#ipv4?.
  (addrinfo_ipv6_p): new method AddrInfo#ipv6?.
  (addrinfo_unix_p): new method AddrInfo#unix?.
  (addrinfo_getnameinfo): new method AddrInfo#getnameinfo.
  (addrinfo_s_getaddrinfo): new method AddrInfo.getaddrinfo.
  (addrinfo_s_tcp): new method AddrInfo.tcp.
  (addrinfo_s_udp): new method AddrInfo.udp.
  (addrinfo_s_unix): new method AddrInfo.unix.
  (Init_socket): define new class and methods.
  (sock_getaddrinfo): apply socktype hack regardless of ai_flags.
  (addrinfo_new): defined.
  (get_afamily): ditto.
  (fd_socket_addrinfo): ditto.
  (io_socket_addrinfo): ditto.
  (SockAddrStringValue): ditto.
  (SockAddrStringValuePtr): ditto.
  (sockaddr_string_value): ditto.
  (sockaddr_string_value_ptr): ditto.
  (rb_addrinfo_t): ditto.
  (addrinfo_mark): ditto.
  (addrinfo_free): ditto.
  (addrinfo_s_allocate): ditto.
  (IS_ADDRINFO): ditto.
  (check_addrinfo): ditto.
  (get_addrinfo): ditto.
  (alloc_addrinfo): ditto.
  (init_addrinfo): ditto.
  (addrinfo_new): ditto.
  (call_getaddrinfo): ditto.
  (init_addrinfo_getaddrinfo): ditto.
  (make_inspectname): ditto.
  (addrinfo_firstonly_new): ditto.
  (addrinfo_list_new): ditto.
  (init_unix_addrinfo): ditto.
  (ai_get_afamily): ditto.

* ext/socket/mkconstants.rb: generate intern_protocol_family,
  intern_socktype and intern_ipproto.

  [ruby-dev:37692]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-07 14:20:15 +00:00
nobu 376004e9c4 * instruby.rb (man, gem): fixed errors.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-07 13:12:32 +00:00
nobu 72937eead8 * instruby.rb: use installed libraries. [ruby-core:21006]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-07 08:14:08 +00:00
nobu f597d65a6f * instruby.rb (gem), lib/rubygems/defaults.rb (Gem.default_dir):
use version invariant configuration.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-07 08:13:07 +00:00
svn 99f0026927 * 2009-01-07
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-07 08:06:32 +00:00
nobu 3117bab125 * ext/socket/socket.c (ruby_getaddrinfo, ruby_getaddrinfo__aix):
constified.

* ext/socket/socket.c (ruby_getnameinfo__aix): protoized.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-07 08:06:29 +00:00
nobu b5470fd243 * ext/socket/socket.c (io_call_close, io_close, pair_yield):
unused unless socketpair exists.

* ext/socket/getnameinfo.c (getnameinfo): moved conditinally used
  variable.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-06 10:18:44 +00:00
nobu 53716bfce7 * cont.c (cont_restore_0): streamlined to ensure O(1) time. based on
a patch by Brent Roman <brent AT mbari.org>.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-06 10:09:54 +00:00
svn 1fffe3d399 * 2009-01-06
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-05 15:35:25 +00:00
akr e6045986ef * io.c (rb_close_before_exec): more heuristics to detect maximum fd.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-05 15:35:21 +00:00
akr 0cd078e358 don't get a name for anonymous Unix socket.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-05 13:40:42 +00:00
nobu 8dee58d7e1 * vm.c (rb_iseq_eval): fixed indent.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-05 09:54:47 +00:00
nobu 893efc4db9 * missing/langinfo.c (nl_langinfo_0): fixed typos for SJIS.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-05 08:59:46 +00:00
nobu c6827f709c * configure.in (cygwin): needs properly implemented nl_langinfo().
[ruby-core:21110]

* missing/langinfo.c: added as suggested at [ruby-core:21015], from
  http://www.cl.cam.ac.uk/~mgk25/ucs/langinfo.c.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21343 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-05 08:51:44 +00:00
usa c123952745 * encoding.c (rb_locale_charmap): use GetConsoleCP() instead of
GetACP() because external encoding should be console's one.

	* encoding.c (rb_filesystem_encoding): use GetOEMCP() instead of
	  GetACP() because VFAT/FAT32 uses OEM CP.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-05 08:44:10 +00:00
kazu e49d229a62 fix typos and cleanup spaces
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21341 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-05 08:00:43 +00:00
nobu 49ef25b151 * encoding.c (rb_filesystem_encoding): use ANSI codepage for file
system on cygwin.

* encoding.c (rb_locale_charmap): reverted.  [ruby-core:21110]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21340 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-05 07:26:51 +00:00
kazu 8dd121b5b7 * ext/curses/curses.c (free_window): use xfree instead of free.
[ruby-dev:37200]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-05 07:16:12 +00:00
kazu 38c5409667 rdoc update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21338 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-05 06:55:14 +00:00
kazu 8f86bc858f * ext/gdbm/gdbm.c (rb_gdbm_fetch): remove needless cast.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-05 06:53:42 +00:00
nobu 97826efddd * win32/win32.c (init_env): use user profile folder than personal
folder.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-05 03:52:11 +00:00
matz 8b7b9e33a5 * file.c (rb_file_s_stat): need type check for non string values.
[ruby-dev:37673]  fix: #964

* file.c (rb_file_s_size, rb_file_s_atime, rb_file_s_mtime,
  rb_file_s_ctime, rb_f_test): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-04 23:59:20 +00:00
matz f3844ccf44 * range.c (range_step): should not add up errors on loops.
[ruby-dev:37691]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-04 23:20:39 +00:00
matz 3c66767bda * random.c (rb_f_srand): update RDoc. [ruby-core:21113]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-04 23:00:39 +00:00
svn 639da29270 * 2009-01-05
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-04 22:32:44 +00:00
matz 61394a1b55 * range.c (range_max): max value from ... not defined for non
Integer Numeric end values. [ruby-dev:37690] fix: #974

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-04 22:32:40 +00:00
akr d4a0895181 * ext/socket/socket.c (rb_getaddrinfo): defined for address lookup without GVL.
(struct getaddrinfo_arg): defined.
  (nogvl_getaddrinfo): defined.
  (rb_getnameinfo): defined for name lookup without GVL.
  (getnameinfo_arg): defined.
  (nogvl_getnameinfo): defined.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-04 13:38:58 +00:00
duerst deeade6f3e * enc/trans/gbk.trans, gbk-tbl.rb:
new Chinese GBK transcoding (from Yoshihiro Kambayashi)

* test/ruby/test_transcode.rb: added tests for the above
  (from Yoshihiro Kambayashi)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-04 09:12:14 +00:00
duerst fecce9e5e5 * test/ruby/test_transcode.rb: added tests for GB2312
(from Yoshihiro Kambayashi)

* enc/trans/chinese.trans: set valid byte patterns for
  GB2312 and GB12345


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-04 08:55:04 +00:00
duerst 3bc30f0b73 * enc/trans/big5.trans, big5-tbl.rb:
new Chinese Big5 transcoding (from Yoshihiro Kambayashi)

* test/ruby/test_transcode.rb: added tests for the above
  (from Yoshihiro Kambayashi)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-04 08:40:26 +00:00
nobu 6754cad8e9 * lib/rubygems.rb (Gem.set_home, Gem.set_paths): should not create
directories stealthily.  [ruby-core:20990]

* lib/rubygems.rb (Gem.find_home): expand_path deals with platform
  dependent envirionments.

* lib/rdoc/ri/paths.rb (RDoc::HOMEDIR): ditto.

* instruby.rb (gem): creates gem directories at installation.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-04 08:07:22 +00:00
nobu ef7057fe2f * encoding.c (rb_filesystem_encoding, rb_locale_charmap): uses
codepage on cygwin.  [ruby-core:20994]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-04 06:41:43 +00:00
nobu 775529991f properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-04 03:59:46 +00:00
nobu 367de8b97b * numeric.c (ruby_float_step): extracted from num_step().
* range.c (range_step): uses ruby_float_step() for float range.
  [ruby-dev:37691]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-04 02:58:45 +00:00
nobu a7999ab13c * ext/extmk.rb (extmake): does not use both of makefile.rb and
extconf.rb at the same time.

* lib/mkmf.rb (DLLIB): depends on Makefile.  [ruby-core:21096]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-04 02:11:33 +00:00
nobu 9ac6838183 * ext/socket/socket.c (constant_arg): constified.
* ext/socket/socket.c (optname_arg): cygwin does not have
  IPPROTO_IPV6.

* ext/socket/mkconstants.rb (ipv6_optname_to_int): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-04 00:27:43 +00:00
akr d51c5a137f * ext/socket/socket.c: redundant #ifdef removed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-03 19:34:17 +00:00
akr 1dfea33652 * io.c (maygvl_copy_stream_wait_read): renamed to add prefix to
express GVL state.
  (nogvl_copy_stream_wait_write): ditto.
  (nogvl_copy_stream_sendfile): ditto.
  (maygvl_copy_stream_read): ditto.
  (nogvl_copy_stream_write): ditto.
  (nogvl_copy_stream_read_write): ditto.
  (nogvl_copy_stream_func): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-03 18:34:06 +00:00
svn 13a67cfcf2 * 2009-01-04
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-03 15:36:18 +00:00
seki da3eba7551 merged r20850, r17881, r16811, r16763, r16748, r15829, r15794 and r15698 from ruby_1_8.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-03 15:36:14 +00:00
naruse 1240916075 change encoding name.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-03 14:12:39 +00:00
usa 9282f9f9d4 * common.mk, Makefile.in, win32/Makefile.sub (INSNS): move the macro
definition from common.mk to {Makefile.in,win32/Makefile.sub}.
	  [ruby-dev:37678]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-03 13:26:11 +00:00