summaryrefslogtreecommitdiff
path: root/ext
AgeCommit message (Collapse)Author
2015-04-12* ext/fiddle/depend: Fix "Wrong mix of special targets" error withakr
OpenBSD make. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-12* ext/-test-/file/fs.c: OpenBSD needs sys/param.h before sys/mount.h.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-11* ext/json/*, test/json/*, defs/default_gems: Gemify JSON library.hsbt
[fix GH-867][Feature #11057] * test/ruby/test_extlibs.rb: removed json gem from existence extentions. * gems/bundled_gems: added json gem into bundled gem. * lib/rdoc/rubygems_hook.rb: ignored no json environment. * lib/rubygems/test_case.rb, test/rubygems/*: ditto. * lib/rdoc/test_case.rb, test/rdoc/*: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-11mkmf.rb: methods to append flagsnobu
* lib/mkmf.rb (append_cppflags, append_cflags, append_ldflags): utility methods to append compiler options. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-10mkmf.rb: fix werror optionnobu
* lib/mkmf.rb (try_compile): pass the given werror flag to try_do to check if stderr is empty. * lib/mkmf.rb (try_cflags, try_ldflags): default werror to true. * win32/Makefile.sub (WERRORFLAG): remove useless option. VC does not make warnings of unknown command option an error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-10* ext/objspace/objspace.c: add ObjectSpace.count_imemo_objects methodko1
to count imemo objects for each type. * test/objspace/test_objspace.rb: add a test. * NEWS: describe about this addition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-10* ext/objspace/objspace.c (setup_hash): unify common routine.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-10ext/date: reject unknown compiler optionnobu
* ext/date/extconf.rb: check warnings. * lib/mkmf.rb (try_cflags): pass options to try_compile. * win32/Makefile.sub (WERRORFLAG): make unknown command line options an error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-09* internal.h (rb_execarg_parent_end): Declared.akr
* process.c: "spawn" opens files in the parent process. (check_exec_redirect): Add an placeholder for fd in parameters for fd_open. (check_exec_fds_1): Delete fd_open condition. (check_exec_fds): Don't call check_exec_fds_1 with fd_open. (rb_execarg_parent_start): Open files specified as "spawn" options and add "dup2" options. (rb_execarg_parent_end): New function to close opened fds. (run_exec_open): Removed. (rb_execarg_run_options): Don't call run_exec_open. (rb_spawn_internal): Call rb_execarg_parent_end. * io.c (pipe_open): Call rb_execarg_parent_end. * ext/pty/pty.c (establishShell): Call rb_execarg_parent_end. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-09* internal.h (rb_execarg_parent_start): Renamed from rb_execarg_fixup.akr
* process.c: Follows the above change. * io.c: Ditto. * ext/pty/pty.c: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-08raddrinfo.c: fix memory leaknobu
* ext/socket/raddrinfo.c (addrinfo_mload): fix memory leak of addrinfo. [ruby-dev:48923] [Bug #11051] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-08* bigdecimal: conform to ruby's license. [ruby-core:68466] [Bug #10952]mrkn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-28fix r50104 [Bug #10906]naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-28* ext/date/extconf.rb: try_cflags("-std=iso9899:1999") [Bug #10906]naruse
ruby itself (including numeric.c) is built with strict compile options including -std=iso9899:1999, but ext/date is not. By the way -std=iso9899:1999 is not only a warning option but also changes behavior like MACRO definitions for example INFINITY. gcc on Solaris affect this. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-25* ext/socket/extconf.rb: Solaris 11 has struct tcp_info.tcpi_ca_state,naruse
but it is a dummy. * ext/socket/option.c: Solaris 11 doesn't have u_intN_t. * ext/socket/option.c: Solaris 11 needs inspect_tcpi_msec. * ext/socket/raddrinfo.c: Solaris 11 has AF_PACKET but doesn't have related macros. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-25fs.c: fix f_typenobu
* ext/-test-/file/fs.c (get_fsname): try magic number only if f_type is included. [ruby-dev:48913] [Bug #11000] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-24fs.c: use statfs/statvfsnobu
* ext/-test-/file/fs.c (get_fsname): return filesystem name by statfs/statvfs. [ruby-core:68624] [Bug #10998] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-21console.c: winsize on Windowsnobu
* ext/io/console/console.c (console_set_winsize): use handle for writing. GetConsoleScreenBufferInfo seems failing on a handle for reading. * io.c: [DOC] update the example of IO#winsize to use $stdout instead of $stdin, which does not work on Windows. a patch by Jan Lelis <mail AT janlelis.de> at [ruby-core:68574]. [Bug #10986] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-13stringio.c: don't raise after closenobu
* ext/stringio/stringio.c (strio_close): don't raise on dobule close for consistent to IO#close. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-13libff: fix enable-shared conditionnobu
* ext/fiddle/extconf.rb: needs --enable-shared when linked to libruby or fiddle.so. since --with-static-linked-ext does no longer link extensions to ruby program with --enable-shared, the only combination needs --enable-static is --disable-shared and --with-static-linked-ext. [ruby-dev:48901] [Bug #10960] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-12accept_nonblock: favor rb_hash_lookup2 to avoid Hash#defaultnormal
* ext/socket/init.c (rsock_s_accept_nonblock): use rb_hash_lookup2 * ext/openssl/ossl_ssl.c (get_no_exception): new function (ossl_ssl_accept_nonblock): use get_no_exception (ossl_ssl_read_internal): ditto (ossl_ssl_write_nonblock): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-12ext/openssl/ossl_ssl.c: predefine wait_*able symbolsnormal
This leads to a size reduction in openssl.so and reduces the chance of bugs due to typos. text data bss dec hex before: 333022 13164 3312 349498 5553a after: 332790 13164 3232 349186 55402 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-12accept_nonblock supports "exception: false"normal
This is analogous to functionality found in IO#read_nonblock and IO#wait_nonblock. Raising exceptions for common failures on non-blocking servers is expensive and makes $DEBUG too noisy. Benchmark results: user system total real default 2.790000 0.870000 3.660000 ( 3.671597) exception: false 1.120000 0.800000 1.920000 ( 1.922032) exception: false (cached arg) 0.820000 0.770000 1.590000 ( 1.589267) --------------------- benchmark script ------------------------ require 'socket' require 'benchmark' require 'tmpdir' nr = 1000000 Dir.mktmpdir('nb_bench') do |path| sock_path = "#{path}/test.sock" s = UNIXServer.new(sock_path) Benchmark.bmbm do |x| x.report("default") do nr.times do begin s.accept_nonblock rescue IO::WaitReadable end end end x.report("exception: false") do nr.times do begin s.accept_nonblock(exception: false) rescue IO::WaitReadable abort "should not raise" end end end x.report("exception: false (cached arg)") do arg = { exception: false } nr.times do begin s.accept_nonblock(arg) rescue IO::WaitReadable abort "should not raise" end end end end end * ext/socket/init.c (rsock_s_accept_nonblock): support exception: false [ruby-core:66385] [Feature #10532] * ext/socket/init.c (rsock_init_socket_init): define new symbols * ext/socket/rubysocket.h: adjust prototype * ext/socket/socket.c (sock_accept_nonblock): support exception: false * ext/openssl/ossl_ssl.c (ossl_ssl_accept_nonblock): ditto * ext/socket/socket.c (Init_socket): adjust accept_nonblock definition * ext/openssl/ossl_ssl.c (Init_ossl_ssl): ditto * ext/socket/tcpserver.c (rsock_init_tcpserver): ditto * ext/socket/unixserver.c (rsock_init_unixserver): ditto * ext/socket/tcpserver.c (tcp_accept_nonblock): adjust rsock_s_accept_nonblock call * ext/socket/unixserver.c (unix_accept_nonblock): ditto * ext/openssl/ossl_ssl.c (ossl_start_ssl): support no_exception * ext/openssl/ossl_ssl.c (ossl_ssl_connect): adjust ossl_start_ssl call * ext/openssl/ossl_ssl.c (ossl_ssl_connect_nonblock): ditto * ext/openssl/ossl_ssl.c (ossl_ssl_accept): ditto * test/socket/test_nonblock.rb (test_accept_nonblock): test for "exception :false" * test/socket/test_tcp.rb (test_accept_nonblock): new test * test/socket/test_unix.rb (test_accept_nonblock): ditto * test/openssl/test_pair.rb (test_accept_nonblock_no_exception): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-11* internal.h: use T_IMEMO to represent `struct MEMO' value.ko1
memo->v1 and memo->v2 is WB protected values. So use MEMO_V1/V2_SET() macros to set these values. memo->u3 is ambiguous (sometimes a VALUE, sometimes an integer value), so use gc_mark_maybe() in gc.c to mark it. Rename NEW_MEMO() to MEMO_NEW(). Move MEMO_FOR and NEW_MEMO_FOF macros from node.h. Export a rb_imemo_new() function for ext/ripper. * node.h: remove NODE_MEMO. * enum.c: catch up these change. * enumerator.c: ditto. * load.c: ditto. * ext/objspace/objspace.c (count_nodes): ditto. * gc.c (gc_mark_children): mark imemo_memo type. * parse.y (new_args_gen): use T_IMEMO. (I'm not sure it is working correctly...) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-11* node.h: remove NODE_IFUNC, NEW_IFUNC.ko1
* internal.h: use T_IMEMO for IFUNC. rename `struct IFUNC' to `struct vm_ifunc' and move the definition from vm_insnhelper.h. Add imemo_ifunc. * gc.c (gc_mark_children): mark imemo_ifunc type T_IMEMO object. * compile.c: catch up these changes. * proc.c: ditto. * vm_core.h (RUBY_VM_IFUNC_P): ditto. * vm_eval.c (rb_iterate): ditto. * vm_insnhelper.c: ditto. * ext/objspace/objspace.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-11* include/ruby/ruby.h: introduce new type T_IMEMO.ko1
T_IMEMO is Internal Memo type, internal use only. T_IMEMO has same purpose of NODE_MEMO. To insert T_IMEMO, type numbers are modified a little. * internal.h: define struct RIMemo. Each RIMemo objects has imemo_type. We can observe it by the imemo_type() function. * gc.c (rb_imemo_new): added. * node.h: remove NODE_CREF and NEW_CREF(). * node.c (rb_gc_mark_node): ditto. * vm.c (vm_cref_new): use rb_imem_new(). * vm_eval.c: ditto. * vm_eval.c (eval_string_with_cref): * vm_eval.c (rb_type_str): * vm_insnhelper.c: use RIMemo objects for CREF. * ext/objspace/objspace.c: support T_IMEMO. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-09stringio.c: don't raise after closenobu
* ext/stringio/stringio.c (strio_close): don't raise on dobule close for consistent to IO#close. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-08* ext/zlib/zlib.c (rb_gzfile_close): Don't raise on doubleakr
close for consistent to IO#close. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-01io/wait: fix return value for buffered readnormal
* ext/io/wait/wait.c (io_nread): wrap return value with INT2FIX Thanks to Yura Sokolov <funny.falcon@gmail.com> [ruby-core:68369] [Bug#10923] * test/io/wait/test_io_wait.rb (test_nread_buffered): fix broken test git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-27* ext/pty/pty.c: AIX supports autopush. Patch by Perry Smith ↵odaira
[ruby-core:58539] [Bug #9144] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-27thread.c: refine enumsnobu
* ext/thread/thread.c: remove unnecessary enum values and add end of enumerations. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-25* ext/win32/Win32API.rb (initialize): accept both a string and an arrayusa
for the arguments of the imported function. reported by Aaron Stone [ruby-core:68208] [Bug #10876] [Fixes GH-835] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-21ossl_bn.c: [DOC] expand rdocs [ci skip]nobu
* ext/openssl/ossl_bn.c: [DOC] expand rdocs as RDoc does not expand C-preprocessor macros. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-21ossl_asn1.c: fix docnobu
* ext/openssl/ossl_asn1.c (ossl_asn1obj_get_oid): [DOC] fix notation, an instance method but not a class method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-21[DOC] Backport ruby/openssl@86eb721 [ci skip]zzak
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-17* ext/psych/lib/psych.rb: bump psych version.tenderlove
* ext/psych/psych.gemspec: ditto * ext/psych/yaml/scanner.c: add latest libyaml change. * test/psych/helper.rb: support newer minitest * test/psych/test_to_yaml_properties.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-16use rb_funcallvnobu
* use rb_funcallv() for no arguments call instead of variadic rb_funcall(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-16console.c: use static IDsnobu
* ext/io/console/console.c (rawmode_opt): prepare static IDs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-16console.c: avoid inadvertent pindownnobu
* ext/io/console/console.c (console_dev): call Kernel#__send__ method to avoid inadvertent pindown. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-16console.c: fix typonobu
* ext/io/console/console.c (console_dev): fix typo, should be rb_funcallv to call with an argument array. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-13coverage.c: suppress a warningnobu
* ext/coverage/coverage.c (coverage_clear_result_i): use local variable coverage. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-13* ext/coverage/coverage.c: Add Coverage.peek_result. Allows you totenderlove
capture coverage information without stopping the coverage tool. [ruby-core:67940] [Feature #10816] * test/coverage/test_coverage.rb: test for change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-13* ext/json: merge upstream from flori/jsonhsbt
change usage of TypedData. [Feature #10739][ruby-core:67564] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-12openssl: check RAND_edg to support libresslnobu
* ext/openssl/extconf.rb: check RAND_edg to support libressl. * ext/openssl/ossl_rand.c (ossl_rand_egd): define only if RAND_edg is available. [Fix GH-829] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-11md5init.c: fix a typonobu
* ext/digest/md5/md5init.c: fix a typo, remove an extra underscore from a macro. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-11digest: CommonDigestnobu
* ext/digest/digest_conf.rb (digest_conf): check for CommonDigest. * ext/digest/*/*cc.h: for Apple CommonCrypto/CommonDigest.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-11digest: define Finish func from Final funcnobu
* ext/digest/digest.h (DEFINE_FINISH_FUNC_FROM_FINAL): macro for finish functions, by inverting arguments order. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-11digest: common configurationsnobu
* ext/digest/digest_conf.rb (digest_conf): extract common configurations. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-11generator.c: fix infinite recursionnobu
* ext/json/generator/generator.c (generate_json): get rid of unnecessary recursive calls which can cause infinite recursion. T_STRING may not have rb_cString. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-10digest: no ID cachenobu
* ext/digest/*/*init.c: no need to cache interned IDs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e