aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* * internal.h (MUL_OVERFLOW_INT_P): New macro.akr2013-04-093-3/+14
| | | | | | | | * sprintf.c (GETNUM): Don't overflow on signed integer multiplication. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * internal.h (MUL_OVERFLOW_SIGNED_INTEGER_P): New macro.akr2013-04-098-53/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | (MUL_OVERFLOW_FIXNUM_P): Ditto. (MUL_OVERFLOW_LONG_P): Ditto. * array.c (rb_ary_product): Don't overflow on signed integer multiplication. * numeric.c (fix_mul): Ditto. (int_pow): Ditto. * rational.c (f_imul): Ditto. * insns.def (opt_mult): Ditto. * thread.c (sleep_timeval): Don't overflow on signed integer addition. * bignum.c (rb_int2big): Don't overflow on signed integer negation. (rb_big2ulong): Ditto. (rb_big2long): Ditto. (rb_big2ull): Ditto. (rb_big2ll): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/open-uri.rb: Support multiple fields with same fieldakr2013-04-094-11/+48
| | | | | | | | | | | name (like Set-Cookie). (OpenURI::Meta#metas): New accessor to obtain fields as a Hash from field name (string) to field values (array of strings). [ruby-core:37734] [Bug #4964] reported by ren li. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_{env,hash}.rb: descriptive assertionsnobu2013-04-092-31/+31
| | | | | | | | * test/ruby/test_{env,hash}.rb: use descriptive assertions than plain assert. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c: append keyword hash to splatnobu2013-04-093-0/+31
| | | | | | | | * compile.c (iseq_compile_each): append keyword hash to argument array to splat if needed. [ruby-core:54094] [Bug #8236] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* mkmf.rb: timestamp directorynobu2013-04-092-7/+20
| | | | | | | | * lib/mkmf.rb (timestamp_file): gather timestamp files in one directory from each extension directories, with considering target_prefix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c: define EWOULDBLOCKnobu2013-04-091-34/+39
| | | | | | | * io.c (Init_IO): define EWOULDBLOCK alway as it is needed always. and turn runtime branch into preprocessor condition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Finish docs for URI::FTP by @darkhelmet [fix GH-274]hsbt2013-04-091-1/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix documentation by @jc00ke [fix GH-278]hsbt2013-04-091-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fixed comment typo by @qqshfox [fix GH-279]hsbt2013-04-091-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40200 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert r40194 "mkmf.rb: timestamp directory"naruse2013-04-081-3/+2
| | | | | | It breaks build. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * properties.nobu2013-04-080-0/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * remove trailing spaces.nobu2013-04-084-6/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix #6154 by introducing new EAGAIN/EWOULDBLOCK/EINPROGRESSheadius2013-04-0810-14/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* mkmf.rb: timestamp directorynobu2013-04-081-2/+3
| | | | | | | * lib/mkmf.rb (timestamp_file): gather timestamp files in one directory from each extension directories. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* socket/extconf.rb: add -Dnobu2013-04-082-2/+5
| | | | | | | * 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
* socket/extconf.rb: check struct in_addr6nobu2013-04-082-1/+8
| | | | | | | * 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
* option.c: fix macro namenobu2013-04-082-2/+4
| | | | | | * 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-09svn2013-04-081-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* constants.c: fix macro namenobu2013-04-082-1/+5
| | | | | | * 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
* object.c: extract common codenobu2013-04-082-61/+35
| | | | | | | * object.c (id_for_setter): extract common code from const, class variable, instance variable setters. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/depend: fix dependency for nmakenobu2013-04-082-3/+6
| | | | | | | * ext/depend (ENCOBJS, TRANSOBJS): use explicit path to ruby.h for nmake. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/depend: fix dependencynobu2013-04-082-2/+8
| | | | | | | | * ext/depend (ENCOBJS, TRANSOBJS): fix header dependency, VPATH has $(srcdir)/include/ruby but not $(srcdir)/include, so cannot find out ruby/ruby.h. use ruby.h instead and ../ruby for include/ruby.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/depend (ENCOBJS, TRANSOBJS): Add missing dependencies.yugui2013-04-082-2/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32ole.c: check aritynobu2013-04-083-0/+14
| | | | | | | * 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
* Fixes a build failure of ext/ripper/ripper.c on building out of place.yugui2013-04-082-7/+13
| | | | | | | * common.mk (id.h, id.c): Always generated in $(srcdir). (ext/ripper/ripper.c): Passes $(PATH_SEPARATOR) too to the sub make. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_curses.rb: add sentinelnobu2013-04-081-1/+3
| | | | | | | | * test/test_curses.rb (TestCurses#run_curses): add sentinel to get rid of read pty output after the child process terminated, which causes EIO on Linux. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cgi/util.rb (CGI::unescapeHTML): fix Hexadecimal numeric character.xibbar2013-04-082-1/+5
| | | | | | [Bug #8183] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Suppress warningsnaruse2013-04-081-6/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2013-04-08svn2013-04-081-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * object.c (rb_obj_ivar_set): call to_str for string only once.naruse2013-04-084-10/+69
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * object.c (rb_mod_const_set): call to_str for string only once.naruse2013-04-072-5/+16
| | | | | | to_str was called from rb_is_const_name and rb_to_id before. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * object.c (rb_mod_cvar_set): call to_str for string only once.naruse2013-04-073-5/+17
| | | | | | to_str was called from rb_is_class_name and rb_to_id before. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Regexp.escape(RUBY_PLATFORM)kazu2013-04-072-1/+7
| | | | | | | | * test/ruby/test_require.rb (TestRequire#test_require_nonascii_path): RUBY_PLATFORM should escape as Regexp, because RUBY_PLATFORM may contain '.'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/defines.h: Simplify the logic to include sys/select.h.akr2013-04-073-4/+13
| | | | | | | | | | | This fixes a compilation error on Haiku (gcc2 and gcc4). * configure.in: Use shared linker as $(CC) for Haiku. This fixes a build error on Haiku (gcc2). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (MDNSOneShot#sender): Delete an unused variable.akr2013-04-072-1/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * addr2line.c: use more generic type:naruse2013-04-062-26/+25
| | | | | | | | | | | | | * u_char -> unsigned char * u_short -> unsigned short * u_int -> unsigned int * u_long -> unsigned long * quad_t -> int64_t * u_quad_t -> uint64_t * addr2line.c (imax): inline is defined by configure. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Improve ruby-electric-mode.knu2013-04-062-21/+81
| | | | | | | | | | | | | | | | | * misc/ruby-electric.el (ruby-electric-hash): New electric function that expands a hash sign inside a string or regexp to "#{}". * misc/ruby-electric.el (ruby-electric-curlies): Do not insert spaces inside when the curly brace is a delimiter of %r, %w, etc. * misc/ruby-electric.el (ruby-electric-curlies): Insert another space before a closing curly brace when ruby-electric-newline-before-closing-bracket is nil. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * strftime.c (rb_strftime_with_timespec): Test yday range.akr2013-04-062-1/+7
| | | | | | | | [ruby-core:44088] [Bug #6247] reported by Ruby Submit. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2013-04-07svn2013-04-061-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40164 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in (AC_CHECK_HEADERS): atomic.h for Solaris atomic_ops.ngoto2013-04-063-2/+9
| | | | | | | * ruby_atomic.h: Skip using Solaris10 atomic_ops on Solaris 9 or earlier if atomic.h is not available. [ruby-dev:47229] [Bug #8228] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb: Support LOC resources.akr2013-04-063-1/+315
| | | | | | | [ruby-core:23361] [Feature #1436] by JB Smith. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * addr2line.c: quad_t and u_quad_t is not available on Solaris.ngoto2013-04-062-0/+19
| | | | | | | | | __inline is not available with old compilers on Solaris. [ruby-dev:47229] [Bug #8227] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb: Add one-shot multicast DNS support.akr2013-04-063-2/+118
| | | | | | | | [ruby-core:53387] [Feature #8089] by Eric Hodel. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Resolv::DNS.fetch_resource): New method to obtainakr2013-04-063-1/+17
| | | | | | | | | full result. [ruby-dev:43587] [Feature #4788] proposed by Makoto Kishimoto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/socket.c (rsock_sys_fail_raddrinfo): Renamed fromakr2013-04-063-9/+18
| | | | | | | | | | | | 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
* * ext/socket/socket.c (rsock_sys_fail_sockaddr): Takes struct sockaddrakr2013-04-063-8/+18
| | | | | | | | | | | | 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
* socket/extconf.rb: RSTRING_SOCKLENnobu2013-04-066-13/+20
| | | | | | | * 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
* socket.c: suppress warningsnobu2013-04-061-1/+1
| | | | | | | * 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
* * ext/socket/rubysocket.h (SockAddrStringValueWithAddrinfo): New macro.akr2013-04-065-15/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | (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