summaryrefslogtreecommitdiff
path: root/ext
AgeCommit message (Collapse)Author
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
2013-08-18* error.c, object.c, ext/readline/README.ja: [DOC] $SAFE=4 is obsolete.ktsj
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-12* ext/dbm/extconf.rb: [DOC] Hide from RDoczzak
Some libraries might want to document extconf.rb so RDoc treats it like any other ruby program. However, DBM users shouldn't care about these methods. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-12* ext/dbm/dbm.c: [DOC] Reformat headings of DBM classzzak
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-12fix r42527 again; [Bug #8760] [ruby-dev:47608] [ruby-dev:47609]naruse
Remove check rl_instream != ifp->stdio_file. rl_instream is made from duped fd and we cannnot compare. This fix seems still buggy when rl_instream is manually changed from other extension libraries. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-12refix r42525 set stdio_file only if stdionaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-11* ext/readline/readline.c (readline_s_set_input): on OS X with editline,naruse
Readline.readline doesn't work because readline_get doesn't use rl_getc. The difference is introduced by r42402 [ruby-dev:47509] [Bug #8644]. Before it rb_io_stdio_file set ifp->stdio_file. Therefore add manually setting the value. * ext/readline/readline.c (readline_s_set_onput): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-11Revert r42502 "ext/-test-/*/depend: TEST_INIT_FUNCS"nobu
Makefiles should be re-configured by extract_makefile. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-10ext/-test-/*/depend: TEST_INIT_FUNCSnobu
* ext/-test-/{bignum,debug,exception,string}/depend: TEST_INIT_FUNCS is created by globbing in extconf.rb git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-10* file.c (rb_str_normalize_ospath):naruse
HFS Plus (Mac OS Extended) uses a variant of Normal Form D in which U+2000 through U+2FFF, U+F900 through U+FAFF, and U+2F800 through U+2FAFF are not decomposed (this avoids problems with round trip conversions from old Mac text encodings). http://developer.apple.com/library/mac/qa/qa1173/_index.html Therefore fix r42457 to exclude the range. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-09* ext/readline/readline.c (insert_ignore_escape): suppressktsj
logical-op-parentheses warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-09io-console.gemspec: drop 1.9nobu
* ext/io/console/io-console.gemspec: drop 1.9 support since rb_cloexec_open() is mandatory now. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-09* ext/io/console/console.c: delete redefinition of rb_cloexec_open.charliesome
This function is always defined by io.c and is declared as non-static in a header file, so this declaration causes a compilation error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-06* ext/openssl/ossl_hmac.c: [DOC] Documentation for OpenSSL::HMACzzak
based on a patch by @repah documenting-ruby/ruby#14 https://github.com/documenting-ruby/ruby/pull/14 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-06* ext/readline/readline.c (readline_s_delete_text): removekouji
checking "$SAFE == 4". * ext/readline/readline.c: fix rdoc, remove "Raises SecurityError" and add "Raises NotImplementedError". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-06* ext/readline/readline.c, test/readline/test_readline.rb: fixkouji
indent. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e