summaryrefslogtreecommitdiff
path: root/ext
AgeCommit message (Collapse)Author
2013-09-24win32/registry.rb: size in bytesnobu
* ext/win32/lib/win32/registry.rb (Win32::Registry#write): data size is in bytes, not chars. terminators should be placed automatically. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-24win32/registry.rb: encode namenobu
* ext/win32/lib/win32/registry.rb (Win32::Registry#each_value): encode name. * ext/win32/lib/win32/registry.rb (Win32::Registry#each_key): ditto. * ext/win32/lib/win32/registry.rb (Win32::Registry#export_string): encode to locale encoding if default internal is not set. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-24win32/registry.rb: fix runtime errorsnobu
* ext/win32/lib/win32/registry.rb (Win32::Registry::API#EnumKey): size of the name is in WCHARs, not in bytes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-24win32/registry.rb: fix runtime errorsnobu
* ext/win32/lib/win32/registry.rb (Win32::Registry::API): need Constants. * ext/win32/lib/win32/registry.rb (Win32::Registry::API#EnumValue): size of the name is in WCHARs, not in bytes git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-23tracepoint.c: no empty initializer listnobu
* ext/-test-/tracepoint/tracepoint.c (tracepoint_track_objspace_events): C89 disallows empty initializer lists. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-22tracepoint.c: wrap data in a structnobu
* ext/-test-/tracepoint/tracepoint.c (struct tracepoint_track): wrap tracepoint tracking data in a struct to be placed on the stack. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-22* ext/-test-/tracepoint/tracepoint.c (Init_tracepoint): prevent from GC.ktsj
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-20* ext/openssl/lib/openssl/ssl.rb: [DOC] Document OpenSSL::SSLServerzzak
Based on a patch by Rafal Lisowski [Bug #7348] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-20* ext/psych/yaml/yaml.h: [DOC] merge upstream typo fix by @GreenGeorgezzak
https://github.com/tenderlove/psych/pull/161 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-20parse.y: junk sigil only namesnobu
* parse.y (intern_str): sigil only names are junk, at least one identifier character is needed. [ruby-dev:47723] [Bug #8928] * parse.y (rb_enc_symname_type): fix out of bound access. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-20* ext/-test-/printf/printf.c (printf_test_call): Fix an end of bufferakr
argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-20ext/-test-/symbol: move upwardnobu
* ext/-test-/symbol/extconf.rb: move the extension object file upward. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-19vsnprintf.c: initialize cpnobu
* vsnprintf.c (BSD_vfprintf): initialize cp so that size is 0 in the commented case. fix an accidental bug at r16716. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-18updating psych versiontenderlove
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-15* ext/socket/mkconstants.rb: define MSG_FASTOPEN.glass
[ruby-core:57138] [Feature #8897] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-12Eliminate less-than-zero checks for unsigned variablesnobu
* ext/bigdecimal/bigdecimal.c, ext/digest/md5/md5.c, ext/json/fbuffer/fbuffer.h, ext/json/generator/generator.c: Eliminate less-than-zero checks for unsigned variables. According to section 4.1.5 of C89 standard, size_t is an unsigned type. These checks were found with 'cppcheck' static analysis tool. [ruby-core:57117] [Feature #8890] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-09* process.c: Remove spaces between SI prefix and unit to followakr
SI brochure. http://www.bipm.org/en/si/si_brochure/ https://www.nmij.jp/library/units/si/ * time.c: Ditto. * ext/socket/ancdata.c: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-08rat.c: suppress warningnobu
* ext/-test-/rational/rat.c (big): used only if GMP is available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-08* ext/win32ole/win32ole.c (folevariant_initialize): check type ofsuke
element of array. * test/win32ole/test_win32ole_variant.rb (test_s_new_ary): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-07thread.c: invertnobu
* ext/thread/thread.c (queue_pop_should_block): the first argument of Queue#pop is non_block and inverted for should_block. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-07thread.c: function castnobu
* ext/thread/thread.c (queue_sleep): get rid of casting function pointer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-07* ext/socket/mkconstants.rb (TCP_FASTOPEN): Defined for TCP fast open.akr
[ruby-core:57048] [Feature #8871] patch by Masaki Matsushita. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-06* common.mk: use RUNRUBY instead of MINIRUBY because MINIRUBY can'tglass
require extension libraries. The patch is from nobu (Nobuyoshi Nakada). * ext/thread/extconf.rb: for build ext/thread/thread.c. * include/ruby/intern.h: ditto. * thread.c: ditto. * lib/thread.rb: removed and replaced by ext/thread/thread.c. * ext/thread/thread.c: Queue, SizedQueue and ConditionVariable implementations in C. This patch is based on patches from panaggio (Ricardo Panaggio) and funny_falcon (Yura Sokolov) and ko1 (Koichi Sasada). [ruby-core:31513] [Feature #3620] * test/thread/test_queue.rb (test_queue_thread_raise): add a test for ensuring that killed thread should be removed from waiting threads. It is based on a code by ko1 (Koichi Sasada). [ruby-core:45950] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-06* rational.c: Include gmp.h if GMP is used.akr
(GMP_GCD_DIGITS): New macro. (rb_gcd_gmp): New function. (f_gcd_normal): Renamed from f_gcd. (rb_gcd_normal): New function. (f_gcd): Invoke rb_gcd_gmp or f_gcd_normal. * internal.h (rb_gcd_normal): Declared. (rb_gcd_gmp): Ditto. * ext/-test-/rational: New directory. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-05* ext/psych/lib/psych/visitors/yaml_tree.rb: use double quotes whentenderlove
strings start with special characters. [Fixes GH-157] https://github.com/tenderlove/psych/issues/157 * test/psych/test_string.rb: test for change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-04* bignum.c (GMP_DIV_DIGITS): New macro.akr
(bary_divmod_gmp): New function. (rb_big_divrem_gmp): Ditto. (bary_divmod_branch): Ditto. (bary_divmod): Use bary_divmod_branch. (bigdivrem): Ditto. * internal.h (rb_big_divrem_gmp): Declared. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-04* bignum.c (rb_big_divrem_normal): New function.akr
* internal.h (rb_big_divrem_normal): Declared. * ext/-test-/bignum/div.c: New file. * test/-ext-/bignum/test_div.rb: New file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-03* bignum.c (GMP_STR2BIG_DIGITS): New macro.akr
(str2big_gmp): New function. (rb_cstr_to_inum): Use str2big_gmp for big bignums. (rb_str2big_gmp): New function. * internal.h (rb_str2big_gmp): Declared. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-03* ext/win32/lib/win32/registry.rb (Win32::Registry#values): added.usa
[Feature #7763] [ruby-core:51783] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-03* bignum.c (rb_str2big_poweroftwo): New function.akr
(rb_str2big_normal): Ditto. (rb_str2big_karatsuba): Ditto. * internal.h (rb_str2big_poweroftwo): Declared. (rb_str2big_normal): Ditto. (rb_str2big_karatsuba): Ditto. * ext/-test-/bignum/str2big.c: New file. * test/-ext-/bignum/test_str2big.rb: New file. * ext/-test-/bignum/depend: Add the dependency for str2big.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-03Reduce NUM2INT invocations.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-02* NEWS: Add note about frozen string literalscharliesome
* compile.c (case_when_optimizable_literal): optimize NODE_LIT strings in when clauses of case statements * ext/ripper/eventids2.c: add tSTRING_SUFFIX * parse.y: add 'f' suffix on string literals for frozen strings * test/ripper/test_scanner_events.rb: add scanner tests * test/ruby/test_string.rb: add frozen string tests [Feature #8579] [ruby-core:55699] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-01Fix funciton name.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-01* bignum.c (GMP_BIG2STR_DIGITS): New constant.akr
(big2str_gmp): New function. (rb_big2str1): Use big2str_gmp for big bignums. * internal.h (rb_big2str_gmp): Declared. * ext/-test-/bignum/big2str.c (big2str_gmp): New method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-01* bignum.c (big2str_base_poweroftwo): Renamed fromakr
big2str_base_powerof2. (rb_big2str_poweroftwo): New function for test. (big2str_generic): Extracted from rb_big2str1. (rb_big2str_generic): New function for test. * internal.h (rb_big2str_poweroftwo): Declared. (rb_big2str_generic): Ditto. * ext/-test-/bignum/big2str.c: New file. * test/-ext-/bignum/test_big2str.rb: New file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-31* bignum.c: Use GMP to accelerate big Bignum multiplication.akr
(bary_mul_gmp): New function. (bary_mul): Use bary_mul_gmp. (bigsq): Use different threshold with GMP. * configure.in: Detect GMP. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-28* ext/zlib/zlib.c (zstream_run): Fix handling of deflate streams thatdrbrain
need a dictionary but are being decompressed by Zlib::Inflate.inflate (which has no option to set a dictionary). Now Zlib::NeedDict is raised instead of crashing. [ruby-trunk - Bug #8829] * test/zlib/test_zlib.rb (TestZlibInflate): Test for the above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-28* ext/psych/lib/psych/scalar_scanner.rb: invalid floats should betenderlove
treated as strings. [Fixes GH-156] https://github.com/tenderlove/psych/issues/156 * test/psych/test_string.rb: test for change git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-27* ext/openssl/ossl_ssl.c (ossl_ssl_read): Replace duplicatedrbrain
wait_writable with wait_readable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-27* ext/stringio/stringio.c (strio_read_nonblock): declare localko1
variables at the first of function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-26* io.c (io_read_nonblock): support non-blocking reads without raisingtenderlove
exceptions. As in: `io.read_nonblock(size, exception: false)` [ruby-core:38666] [Feature #5138] * ext/openssl/ossl_ssl.c (ossl_ssl_read_internal): ditto * ext/stringio/stringio.c (strio_sysread): ditto * io.c (rb_io_write_nonblock): support non-blocking writes without raising an exception. * ext/openssl/ossl_ssl.c (ossl_ssl_write_internal): ditto * test/openssl/test_pair.rb (class OpenSSL): tests * test/ruby/test_io.rb (class TestIO): ditto * test/socket/test_nonblock.rb (class TestSocketNonblock): ditto * test/stringio/test_stringio.rb (class TestStringIO): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-26* array.c (rb_ary_splice): use RARRAY_PTR_USE() without WB becauseko1
there are not new relations. * enum.c (enum_sort_by): ditto. * struct.c (setup_struct): use RARRAY_RAWPTR(). * vm_eval.c (yield_under): ditto. * ext/pathname/pathname.c (path_entries): use RARRAY_AREF(). * ext/pathname/pathname.c (path_s_glob): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-23win32ole.c: ID overflownobu
* ext/win32ole/win32ole.c (GetIDsOfNames): check ID overflow against DISPID, aka LONG, which is always 4 bytes. * ext/win32ole/win32ole.c (Invoke): use ID for method name to get rid of losing upper bits. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-23win32ole.c: store directlynobu
* ext/win32ole/win32ole.c (ole_wc2vstr): store converted multibyte string to string value directly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-23win32ole.c: suppress a warningnobu
* ext/win32ole/win32ole.c (ole_vstr2wc): downcast to suppress a warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-23win32ole.c: check method name lengthnobu
* ext/win32ole/win32ole.c (fole_missing): reject too long method name, as Ruby string length is limited to long. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-23win32ole.c: suppress warningsnobu
* ext/win32ole/win32ole.c (ole_excepinfo2msg, ole_wc2vstr): get rid of size_t with rb_enc_str_new() to suppress warnings on x64-mswin32. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-23win32ole.c: no copy stringnobu
* ext/win32ole/win32ole.c (foletypelib_name, foletypelib_path): WC2VSTR() returns a string in cWIN32OLE_enc, no need to copy another string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-23win32ole.c: fix typenobu
* ext/win32ole/win32ole.c (ole_method_docinfo_from_type): fix return type. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-19* ext/socket/unixserver.c: [DOC] Document #acceptzzak
* ext/socket/tcpserver.c: ditto * ext/socket/udpsocket.c: [DOC] Fix indentation of documentation * ext/socket/socket.c: ditto Patches by David Rodríguez [ruby-core:56734] [Bug #8802] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e