summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-03-13test_objspace.rb: better assertionsnobu
* test/objspace/test_objspace.rb: use assertions for better failure messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-13* test/readline/test_readline.rb: Restore environment variables:akr
COLUMNS LINES git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49958 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-13Makefile.in: no probes.stamp unless DTRACE_REBUILDnobu
* Makefile.in (probes.o): do not need to rebuild object files unless `dtrace -G` modifies input object files. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49956 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-12gmake.mk: wait showflagsnobu
* defs/gmake.mk (showflags): finish before object files start. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-12* 2015-03-13svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-12fix typos [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-12fix env leaksnobu
* lib/rubygems/test_case.rb (setup, teardown): fix environment variable change leaks. * test/cgi/update_env.rb: ditto. * test/rake/test_rake_application_options.rb (setup, teardown): ditto. * test/rake/test_rake_file_utils.rb (setup, teardown): ditto. * test/rubygems/test_gem_request.rb (setup): add https_proxy. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-12* test/lib/leakchecker.rb: Check environment variables.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49949 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-12* internal.h, node.h: move a definition of `struct rb_global_entry'ko1
and related functions from node.h to internal.h. * variable.c: remove unused include pragma. * common.mk: remove unused dependency. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-12* common.mk: remove unused dependency.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-12fake.rb.in: expand srcdirnobu
* template/fake.rb.in (top_srcdir): expand for the case @srcdir@ is not a relative path. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-11* load.c: removed unused header file "node.h".ko1
* method.h: ditto. * symbol.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-11* gc.c: RGENGC_CHECK_MODE should be 0.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49943 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* 2015-03-12svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49941 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-11fix typos [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-11* eval.c (frame_called_id): it should use vm_ifunc type.ko1
* eval.c (frame_func_id): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49939 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* internal.h, eval_intern.h: move CREF accessors.ko1
List IMEMO supported types in internal.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-11* vm_insnhelper.h: use T_IMEMO to create THROW_DATA.ko1
Add THROW_DATA_NEW(). * internal.h: move defnition of `struct THROW_DATA' from vm_insnhelper.h to internal.h. Rename `THROW_DATA' to `vm_throw_data'. * eval_intern.h (THROW_DATA_P): move to internal.h. THROW_DATA is no longer T_NODE, so check T_IMEMO. * gc.c (gc_mark_children): mark THROW_DATA. * vm.c: catch up these changes. * vm_eval.c: ditto. * vm_insnhelper.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-11* vm_insnhelper.c: use T_IMEMO to create SVAR.ko1
* internal.h, vm_insnhelper.h: move definition `struct SVAR' from vm_insnhelper.h to internal.h. And rename it to strcut vm_svar. new imemo_type imemo_svar is added. * gc.c (gc_mark_children): mark imemo_svar. * node.c (rb_gc_mark_node): remove useless marking. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49935 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-11fix ChangeLog entryko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-11* remove trailing spaces.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49933 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-11* gc.c: fix memory leak by prepend method.ko1
It is easy to reproduce with such script: module M; def bar; end; end loop{ Class.new do def foo; end prepend M end } * gc.c (obj_free): free T_ICLASS::m_tbl if it is created by prepend. To recognize it, check RICLASS_IS_ORIGIN flag. * gc.c (gc_mark_children): T_ICLASS objects only need to mark T_ICLASS::m_tbl if RICLASS_IS_ORIGIN is set. * gc.c (obj_memsize_of): count T_ICLASS if RICLASS_IS_ORIGIN is set. * internal.h (RCLASS_SET_ORIGIN): add to set RCLASS_SET_ORIGIN. TODO: The word `origin' seems not good name. We need to invent another good name. * class.c: use RCLASS_SET_ORIGIN(). * class.c (class_alloc): zero clear rb_classext_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-11vm_dump.c: check procstat_getvmmapnobu
* configure.in: check also procstat_getvmmap, which is not available on FreeBSD 9. [ruby-core:68468] [Bug #10954] * vm_dump.c (procstat_vm): use kinfo_getvmmap instead if procstat_getvmmap is not available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-11normalize.rb: remove redundant hashnobu
* lib/unicode_normalize/normalize.rb (UnicodeNormalize): REGEXP_K matches only single chars which are keys of KOMPATIBLE_TABLE, so string in nfkd_one is always single char and one of the key of KOMPATIBLE_TABLE, that is that the default proc of NF_HASH_K only copies a pair in KOMPATIBLE_TABLE. therefore NF_HASH_K is a part of KOMPATIBLE_TABLE always, and just redundant. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-11* internal.h: define struct MEMO.ko1
* enum.c: use MEMO. * enumerator.c: ditto. * load.c: ditto. * node.h: return (struct MEMO *) pointer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-10* vm_insnhelper.h (THROW_DATA_STATE): return int, not VALUE.ko1
* vm_insnhelper.h (THROW_DATA_STATE_SET): accept int value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-10* vm_eval.c (rb_catch_protect): use THROW_DATA_VAL().ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-10* vm_insnhelper.h: define struct IFUNC.ko1
* vm_eval.c (rb_iterate): use it. * vm_insnhelper.c (vm_yield_with_cfunc): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-10* remove trailing spaces.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-10* eval_intern.h (THROW_DATA_P): use RB_TYPE_P() instead ofko1
BUILTIN_TYPE(). * thread.c (thread_join): use THROW_DATA_P(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-10* proc.c: use RUBY_VM_IFUNC_P() to recognize IFUNC or not.ko1
* vm.c: ditto. * vm_dump.c: ditto. * vm_insnhelper.c: ditto. * vm_core.h: use RB_TYPE_P() instead of BUILTIN_TYPE(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-10* vm_insnhelper.h: define struct THROW_DATA to representko1
throwing data. Also define accessor functions. * eval_intern.h: move related changes into vm_insnhelper.h. Now these MACROs (functions) are only used in vm*.c. There is only THROW_DATA_P(err) to check this data type or not. * vm.c: catch up these changes. * vm_eval.c: ditto. * vm_insnhelper.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-10* 2015-03-11svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-10* test/rubygems/test_gem_security_trust_dir.rb: The return value ofodaira
File::Stat#mode is OS dependent. In AIX, 0200000 is set. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-10* enum.c (enum_slice_when): [DOC] fix typo.ktsj
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-10* lib/webrick/server.rb: Invoke setup_shutdown_pipe in start methodakr
instead of listen method. [ruby-core:68476] [Bug #10956] Reported by Shintaro Kojima. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-10test_math.rb: to_f testsnobu
* test/ruby/test_math.rb (test_{fixnum,bignum,rational}_to_f): refine to_f tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-10* thread.c (thread_join): Fixnum (except TAG_FATAL) andko1
NODE should not be reached here. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-10* 2015-03-10svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-10math.c: fix tgamma on mingwnobu
* math.c (mingw_tgamma): tgamma(3) on mingw returns a NaN for a big number, not infinity. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-09* vm_insnhelper.c (ep_cref): rename to lep_cref() because it should beko1
local ep. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49906 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-09suppress warningsnobu
* test/ruby/beginmainend.rb: suppress warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e