summaryrefslogtreecommitdiff
path: root/ext
AgeCommit message (Collapse)Author
2013-04-12* ext/etc/etc.c: fix struct name.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-12etc.c: Etc namespacenobu
* ext/etc/etc.c (Init_etc): move Passwd and Group under Etc namespace as primary names. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-11Fix typonaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-11* ext/fiddle/closure.c (USE_FFI_CLOSURE_ALLOC): define 0 onnaruse
Mac OS X and Linux [Bug #3371] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-11* ext/fiddle/closure.c (USE_FFI_CLOSURE_ALLOC): add missing case:naruse
RUBY_LIBFFI_MODVERSION is not defined (usually on Windows). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-10* ext/fiddle/extconf.rb: define RUBY_LIBFFI_MODVERSION macro.naruse
* ext/fiddle/closure.c (USE_FFI_CLOSURE_ALLOC): define 0 or 1 with platform and libffi's version. [Bug #3371] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-10* ext/fiddle/closure.c (initialize): check mprotect's return value.naruse
If mprotect is failed because of PaX or something, its function call will cause SEGV. http://c5664.rubyci.org/~chkbuild/ruby-trunk/log/20130401T210301Z.diff.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-10* ext/bigdecimal/bigdecimal.c (VpCtoV): Initialize a local variableakr
even when overflow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-10* bignum.c (rb_ll2big): Don't overflow on signed integer negation.akr
* ext/bigdecimal/bigdecimal.c (MUL_OVERFLOW_SIGNED_VALUE_P): New macro. (AddExponent): Don't overflow on signed integer multiplication. (VpCtoV): Don't overflow on signed integer arithmetic. (VpCtoV): Don't overflow on signed integer arithmetic. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-08* remove trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-08Fix #6154 by introducing new EAGAIN/EWOULDBLOCK/EINPROGRESSheadius
subclasses that include WaitReadable or WaitWritable rather than extending them into the exception object each time. * error.c: Capture EGAIN, EWOULDBLOCK, EINPROGRESS exceptions and export them for use in WaitReadable/Writable exceptions. * io.c: Create versions of EAGAIN, EWOULDBLOCK, EINPROGRESS that include WaitReadable and WaitWritable. Add rb_readwrite_sys_fail for nonblocking failures using those exceptions. Use that function in io_getpartial and io_write_nonblock instead of rb_mod_sys_fail * ext/openssl/ossl_ssl.c: Add new SSLError subclasses that include WaitReadable and WaitWritable. Use those classes for write_would_block and read_would_block instead of rb_mod_sys_fail. * ext/socket/ancdata.c: Use rb_readwrite_sys_fail instead of rb_mod_sys_fail in bsock_sendmsg_internal and bsock_recvmsg_internal. * ext/socket/init.c: Use rb_readwrite_sys_fail instead of rb_mod_sys_fail in rsock_s_recvfrom_nonblock and rsock_s_connect_nonblock. * ext/socket/socket.c: Use rb_readwrite_sys_fail instead of rb_mod_sys_fail in sock_connect_nonblock. * include/ruby/ruby.h: Export rb_readwrite_sys_fail for use instead of rb_mod_sys_fail. Introduce new constants RB_IO_WAIT_READABLE and RB_IO_WAIT_WRITABLE for first arg to rb_readwrite_sys_fail. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-08socket/extconf.rb: add -Dnobu
* ext/socket/extconf.rb: $defs needs -D or -U. nothing is added otherwize. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-08socket/extconf.rb: check struct in_addr6nobu
* ext/socket/extconf.rb: check struct in_addr6, which is defined in VC6 instead of in6_addr. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-08option.c: fix macro namenobu
* ext/socket/option.c (optname_to_sym): fix macro name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-08constants.c: fix macro namenobu
* ext/socket/constants.c (rsock_cmsg_type_arg): fix macro name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-08win32ole.c: check aritynobu
* ext/win32ole/win32ole.c (fole_missing): should check actual argument count before accessing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-06* ext/socket/socket.c (rsock_sys_fail_raddrinfo): Renamed fromakr
rsock_sys_fail_addrinfo. (rsock_sys_fail_raddrinfo_or_sockaddr): Renamed from rsock_sys_fail_addrinfo_or_sockaddr. * ext/socket/rubysocket.h: Follow the above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-06* ext/socket/socket.c (rsock_sys_fail_sockaddr): Takes struct sockaddrakr
and socklen_t instead of String object. (rsock_sys_fail_addrinfo_or_sockaddr): Follow the above change. * ext/socket/rubysocket.h (rsock_sys_fail_sockaddr): Follow the above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-06socket/extconf.rb: RSTRING_SOCKLENnobu
* ext/socket/extconf.rb (RSTRING_SOCKLEN): macro to cast RSTRING_LEN to socklen_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-06socket.c: suppress warningsnobu
* ext/socket/socket.c (rsock_sys_fail_sockaddr): cast down explicitly to suppress warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-06* ext/socket/rubysocket.h (SockAddrStringValueWithAddrinfo): New macro.akr
(rsock_sockaddr_string_value_with_addrinfo): New declaration. (rsock_addrinfo_inspect_sockaddr): Ditto. (rsock_sys_fail_addrinfo): Ditto. (rsock_sys_fail_sockaddr_or_addrinfo): Ditto. * ext/socket/raddrinfo.c (rsock_addrinfo_inspect_sockaddr): Renamed from addrinfo_inspect_sockaddr and exported. (rsock_sockaddr_string_value_with_addrinfo): New function to obtain string and possibly addrinfo object. * ext/socket/socket.c (rsock_sys_fail_sockaddr): Don't use rsock_sys_fail_host_port which is IP dependent. Invoke rsock_sys_fail_addrinfo. (rsock_sys_fail_addrinfo): New function using rsock_addrinfo_inspect_sockaddr. (rsock_sys_fail_addrinfo_or_sockaddr): New function. (sock_connect): Use SockAddrStringValueWithAddrinfo and rsock_sys_fail_addrinfo_or_sockaddr. (sock_connect_nonblock): Ditto. (sock_bind): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-06* ext/socket/socket.c (rsock_sys_fail_sockaddr): Delete 2nd argument.akr
* ext/socket/rubysocket.h (rsock_sys_fail_sockaddr): Follow above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-06* ext/socket/socket.c (rsock_sys_fail_path): Use rb_str_inspect onlyakr
for String to avoid SEGV. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-06* ext/socket/rubysocket.h (rsock_sys_fail_host_port) Wrap by NORETURN.akr
(rsock_sys_fail_path): Ditto. (rsock_sys_fail_sockaddr): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-06* ext/socket/socket.c (rsock_sys_fail_path): Use rb_str_inspect if theakr
path contains a NUL. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-06* ext/socket: Improve socket exception message to show socket address.akr
[ruby-core:45617] [Feature #6583] proposed Eric Hodel. * ext/socket/rubysocket.h (rsock_sys_fail_host_port): Declared. (rsock_sys_fail_path): Ditto. (rsock_sys_fail_sockaddr): Ditto. * ext/socket/udpsocket.c (udp_connect): Use rsock_sys_fail_host_port. (udp_bind): Ditto. (udp_send): Ditto. * ext/socket/init.c (rsock_init_sock): Specify a string for rb_sys_fail argument. (make_fd_nonblock): Ditto. (rsock_s_accept): Ditto. * ext/socket/ipsocket.c (init_inetsock_internal): Use rsock_sys_fail_host_port. * ext/socket/socket.c (rsock_sys_fail_host_port): Defined. (rsock_sys_fail_path): Ditto. (rsock_sys_fail_sockaddr): Ditto. (setup_domain_and_type): Use rsock_sys_fail_sockaddr. (sock_connect_nonblock): Ditto. (sock_bind): Ditto. (sock_gethostname): Specify a string for rb_sys_fail argument. (socket_s_ip_address_list): Ditto. * ext/socket/basicsocket.c (bsock_shutdown): Specify a string for rb_sys_fail argument. (bsock_setsockopt): Use rsock_sys_fail_path. (bsock_getsockopt): Ditto. (bsock_getpeereid): Refine the argument for rb_sys_fail. * ext/socket/unixsocket.c (rsock_init_unixsock): Use rsock_sys_fail_path. (unix_path): Ditto. (unix_send_io): Ditto. (unix_recv_io): Ditto. (unix_addr): Ditto. (unix_peeraddr): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-05* ext/psych/lib/psych/visitors/yaml_tree.rb: fix symbol keys in codertenderlove
emission. Thanks @tjwallace * test/psych/test_coder.rb: test for change git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-05* ext/psych/lib/psych/exception.rb: there should be only one exceptiontenderlove
base class. Fixes tenderlove/psych #125 * ext/psych/lib/psych.rb: require the correct exception class * ext/psych/lib/psych/syntax_error.rb: ditto * ext/psych/lib/psych/visitors/to_ruby.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-05* ext/psych/lib/psych/visitors/to_ruby.rb: correctly registertenderlove
self-referential strings. Fixes tenderlove/psych #135 * test/psych/test_string.rb: appropriate test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-05* ext/socket/init.c (cloexec_accept): Fix a compile error onakr
Debian GNU/kFreeBSD. Consider HAVE_ACCEPT4 is defined but SOCK_CLOEXEC is not defined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-05ext/-test-/win32/dln: remove static librarynobu
* ext/-test-/win32/dln/extconf.rb: remove static library too at clean. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-05dl/dl.h: suppress warningnobu
* ext/dl/dl.h (dlopen): suppress unused-but-set-variable warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-05curses.c: fix functionnobu
* ext/curses/curses.c (Init_curses): fix implementation function, crmode should be same as cbreak. [ruby-core:54013] [Bug #8222] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-05* ext/curses/hello.rb: Typo in Curses example by Drew Blaszzak
[Fixes GH-273] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-04* ext/socket/extconf.rb: Remove condition for bcc.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-04* ext/pathname/pathname.c (path_write): New method.akr
(path_binwrite): Ditto. [ruby-core:49468] [Feature #7378] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-04* ext/openssl/ossl_bn.c (ossl_bn_to_i): Use bn2hex to speed up.naruse
In general, binary to/from decimal needs extra cost. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-03* ext/socket/extconf.rb: Specify arguments to test functions.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-03* ext/openssl/ossl_bn.c (ossl_bn_initialize): fix can't create from bn.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-03* ext/socket/extconf.rb: Test functions and libraries after headers.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-03* ext/extmk.rb (extmake): Invoke Logging::log_close in a ensureakr
clause. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-03* ext/extmk.rb (extmake): Use Logging.open to switch stdout andakr
stderr. Delay Logging::log_close until the failure message is written. Write the failure message only if log file is opened. * lib/mkmf.rb (Logging.log_opened?): New method. [ruby-dev:47215] [Bug #8209] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-03bignum.c: Bignum zero comparisonnobu
* bignum.c (rb_big_eq): test as Fixnum if possible and get rid of zero length Bignum. [ruby-core:53893] [Bug #8204] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-02* ext/-test-/num2int/num2int.c: Define utility methodsakr
as module methods of Num2int. * test/-ext-/num2int/test_num2int.rb: Follow the above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-01* ext/-test-/num2int/num2int.c: Rename utility methodsakr
to global functions to ease manual experiments. * test/-ext-/num2int/test_num2int.rb: Follow the above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-01* ext/zlib/zlib.c (rb_gzfile_set_mtime): Use NUM2UINT.akr
The old logic doesn't work well on LP64 platforms as: .. -2**63-1 => error, -2**63 .. -2**62-1 => success, -2**62 .. -2**31-1 => error, -2**31 .. 2**31-1 => success, 2**31 .. 2**62-1 => error, 2**62 .. 2**64-1 => success, 2**64 .. => error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-01* ext/zlib/zlib.c (Zlib::Inflate.new):eregon
Fix documentation syntax and naming errors. Based on patch by Robin Dupret. Fix GH-271. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-01* ext/-test-/num2int/num2int.c: Return string for result, instead ofakr
printing. * test/-ext-/num2int/test_num2int.rb: updated to follow above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-01sha2.c: suppress warningsnobu
* ext/digest/sha2/sha2.c (SHA256_Final, SHA512_Last): suppress strict-aliasing warnings on gcc 4.8. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-31* include/ruby/ruby.h (FIX2ULONG): Make it consistent with NUM2ULONG.akr
* ext/-test-/num2int/num2int.c: Add utility methods for FIX2XXX tests. * test/-ext-/num2int/test_num2int.rb: Add tests for FIX2XXX. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e