summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-07-06* vm_core.h: remove rb_iseq_t::defined_method_id because it is notko1
needed. * eval.c (frame_func_id): simplify. rb_callable_method_entry_t has enough information. * eval.c (frame_called_id): ditto. * iseq.c (prepare_iseq_build): catch up this fix. * proc.c (rb_mod_define_method): ditto. * vm.c (vm_define_method): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-06* vm_core.h: remove a useless declaration.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-06* vm_core.h: remove rb_iseq_t::klass to reduce dynamic data.ko1
* internal.h, iseq.c (rb_iseq_klass): remove it because rb_iseq_t::klass is removed. * vm_insnhelper.c (vm_super_outside): do not see cfp->iseq, but check callable method entry on a frame. This fix simplify the logic to search super class. * test/ruby/test_method.rb: support super() from Proc. Now, [Bug #4881] and [Bug #3136] was solved. * proc.c (rb_mod_define_method): catch up this change. * vm.c (vm_define_method): ditto. * vm_backtrace.c (rb_profile_frames): now, each `frame' objects are rb_callable_method_entry_t data or iseq VALUEs. This fix introduce minor compatibility issue that rb_profile_frame_label() always returns rb_profile_frame_base_label(). * test/-ext-/debug/test_profile_frames.rb: catch up this change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-06* cont.c (fiber_init): initialize control frame correctly.ko1
This fix does not affect any ordinal execution, but affects debug prints. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-06* 2015-07-07svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51164 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-06* test/ruby/test_array.rbusa
(TestArray#test_short_heap_array_sort_bang_memory_leak): relax the threshold to get rid of a false positive failure of mswin CI. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-06fix a typo [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-06* vm_insnhelper.c (vm_search_super_method): do not skip callingko1
same methods in super. [Bug #3351] * test/ruby/test_super.rb: fix a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-06* ext/tk/tcltklib.c: removed deprecated safe level.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-06* method.h, proc.c (rb_method_entry_location): make it staticko1
and remoev prefix `rb_' because it is used only in proc.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-06* test/lib/memory_status.rb: removed redundant path.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-06string.c: register_fstringnobu
* string.c (register_fstring): separate registration from rb_fstring(). * string.c (rb_fstring_new): skip argument checks in rb_fstring(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-05fix multiple loadnobu
* test/rubygems/test_gem_commands_install_command.rb: previously load rubygems/request_set which will be required in rubygems/commands/install_command.rb to get rid of loading multiple times. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-05test/ruby/test_array.rb: longer timeout for memory leak testnormal
This was causing CI failures on ko1's test box git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-05* 2015-07-06svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-05parallel.rb: upper directorynobu
* test/lib/test/unit/parallel.rb: make @@project_dir one level upper as this file had moved one level deeper. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-05Fix typo in optparse library [ci skip] [Fix GH-956]nobu
* lib/optparse.rb: [DOC] Fix typo. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-05gc.c (gc_profile_record_get): fix spelling error in keysnormal
This may cause compatibility problems for some users, but maybe nobody tracked it closely in the past because it is disabled by default. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-05* README.md: fix a typo pointed out by raoulvdberge. [ci skip] [DOC]nagachika
https://github.com/ruby/ruby/pull/953#commitcomment-11998186 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-05Update README.md [ci skip] [Fix GH-953]nobu
* README.md: Added link HowToReport bugs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-05test_process.rb: reap pidnobu
* test/ruby/test_process.rb (test_exec_fd_3_redirect): should reap the grandchild process, in common. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-05array.c: fix memory leaknobu
* array.c (rb_ary_sort_bang): the original array may not be embedded even if a substitution array is embedded, as it is embedded when the original array is short enough but not embedded. [ruby-dev:49166] [Bug #11332] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-05test/ruby/test_process.rb: test for fd=3 usability in childnormal
Ensure we can redirect anything to fd=3 in a child process. This test exists because fd=3 is a commonly reserved FD for a timer thread pipe in the parent Ruby VM, but fd=3 is the first FD used by the sd_listen_fds function for systemd. This means there is a possibility for a bug to slip in where the redirect to fd=3 fails to work. This test should ensure the continued viability of systemd replacements in Ruby :> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-04* 2015-07-05svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-04fix typos [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-04all?, any?, one?, none? of empty Enumerablenobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-04* Add test case for empty array and first method with args.hsbt
Patch by @yui-knk [fix GH-955] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-04* Add test for `Enumerable#sort` with block. Patch by @yui-knkhsbt
[fix GH-954] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-04enum.c: remove volatile, use RB_GC_GUARDnormal
volatile appears unnecessary in most cases as the VALUEs are used as arguments of uninlined functions. Even worse, volatile can be insufficient in places where RB_GC_GUARD is necessary. * enum.c (zip_ary): remove volatile, use RB_GC_GUARD (zip_i): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-04test_case.rb: fix multiple loadnobu
* lib/rubygems/test_case.rb (teardown): do not delete features loaded from the original load paths, the same libraries should be loaded again when the same features are required. [ruby-dev:49031] [Bug #11222] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-04* 2015-07-04svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-04vm.c: reduce branches for always-set VM fieldsnormal
thgroup_default, mark_object_ary, load_path, load_path_snapshot, expanded_load_path, loaded_features, loaded_features_snapshot, top_self, defined_module_hash are always defined at process startup. This makes it wasteful to have extra branches in an an effort to skip the function call to `rb_gc_mark'. This reduces binary size a small amount on x86-64: text data bss dec hex filename 2830738 22672 71584 2924994 2ca1c2 ruby.orig 2830234 22672 71584 2924490 2c9fca ruby.after More similar changes coming when I'm bored enough to notice... * vm.c (rb_vm_mark): reduce branches for always-set VM fields (rb_vm_add_root_module): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-03* remove trailing spaces.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-03* method.h: introduce rb_callable_method_entry_t to removeko1
rb_control_frame_t::klass. [Bug #11278], [Bug #11279] rb_method_entry_t data belong to modules/classes. rb_method_entry_t::owner points defined module or class. module M def foo; end end In this case, owner is M. rb_callable_method_entry_t data belong to only classes. For modules, MRI creates corresponding T_ICLASS internally. rb_callable_method_entry_t can also belong to T_ICLASS. rb_callable_method_entry_t::defined_class points T_CLASS or T_ICLASS. rb_method_entry_t data for classes (not for modules) are also rb_callable_method_entry_t data because it is completely same data. In this case, rb_method_entry_t::owner == rb_method_entry_t::defined_class. For example, there are classes C and D, and incldues M, class C; include M; end class D; include M; end then, two T_ICLASS objects for C's super class and D's super class will be created. When C.new.foo is called, then M#foo is searcheed and rb_callable_method_t data is used by VM to invoke M#foo. rb_method_entry_t data is only one for M#foo. However, rb_callable_method_entry_t data are two (and can be more). It is proportional to the number of including (and prepending) classes (the number of T_ICLASS which point to the module). Now, created rb_callable_method_entry_t are collected when the original module M was modified. We can think it is a cache. We need to select what kind of method entry data is needed. To operate definition, then you need to use rb_method_entry_t. You can access them by the following functions. * rb_method_entry(VALUE klass, ID id); * rb_method_entry_with_refinements(VALUE klass, ID id); * rb_method_entry_without_refinements(VALUE klass, ID id); * rb_resolve_refined_method(VALUE refinements, const rb_method_entry_t *me); To invoke methods, then you need to use rb_callable_method_entry_t which you can get by the following APIs corresponding to the above listed functions. * rb_callable_method_entry(VALUE klass, ID id); * rb_callable_method_entry_with_refinements(VALUE klass, ID id); * rb_callable_method_entry_without_refinements(VALUE klass, ID id); * rb_resolve_refined_method_callable(VALUE refinements, const rb_callable_method_entry_t *me); VM pushes rb_callable_method_entry_t, so that rb_vm_frame_method_entry() returns rb_callable_method_entry_t. You can check a super class of current method by rb_callable_method_entry_t::defined_class. * method.h: renamed from rb_method_entry_t::klass to rb_method_entry_t::owner. * internal.h: add rb_classext_struct::callable_m_tbl to cache rb_callable_method_entry_t data. We need to consider abotu this field again because it is only active for T_ICLASS. * class.c (method_entry_i): ditto. * class.c (rb_define_attr): rb_method_entry() does not takes defiend_class_ptr. * gc.c (mark_method_entry): mark RCLASS_CALLABLE_M_TBL() for T_ICLASS. * cont.c (fiber_init): rb_control_frame_t::klass is removed. * proc.c: fix `struct METHOD' data structure because rb_callable_method_t has all information. * vm_core.h: remove several fields. * rb_control_frame_t::klass. * rb_block_t::klass. And catch up changes. * eval.c: catch up changes. * gc.c: ditto. * insns.def: ditto. * vm.c: ditto. * vm_args.c: ditto. * vm_backtrace.c: ditto. * vm_dump.c: ditto. * vm_eval.c: ditto. * vm_insnhelper.c: ditto. * vm_method.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-03* lib/cmath.rb: shouldn't use non-ASCII characters in documentation. as ausa
custom, single quote is seen as the same as apostrophe in computer typography. [skip ci] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-03file.c: _wfreopen_s on mingwnobu
* win32/file.c: some mingw compilers need a tweek for the declarations of _wfreopen_s. [Bug #11320] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-03transcode.c: empty encoding namenobu
* transcode.c (rb_econv_set_replacement): target encoding name can be empty now. [ruby-core:69841] [Bug #11324] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-02object.c: fix up r51039nobu
* object.c (convert_type): conversion without "to_" prefix is not implicit. fix up r51039. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-02* properties.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-02delay `exception: false' checks for minor speedupnormal
Delay hash lookups until we are about to hit an exception. This gives a minor speedup ratio of 2-3% in the new bm_io_nonblock_noex benchmark as well as reducing code. * benchmark/bm_io_nonblock_noex.rb: new benchmark * ext/openssl/ossl_ssl.c (no_exception_p): new function (ossl_start_ssl): adjust for no_exception_p (ossl_ssl_connect): adjust ossl_start_ssl call (ossl_ssl_connect_nonblock): ditto (ossl_ssl_accept): ditto (ossl_ssl_accept_nonblock): ditto (ossl_ssl_read_internal): adjust for no_exception_p (ossl_ssl_write_internal): ditto (ossl_ssl_write): adjust ossl_write_internal call (ossl_ssl_write_nonblock): ditto * ext/stringio/stringio.c (strio_read_nonblock): delay exception check * io.c (no_exception_p): new function (io_getpartial): call no_exception_p (io_readpartial): adjust for io_getpartial (get_kwargs_exception): remove (io_read_nonblock): adjust for io_getpartial, check no_exception_p on EOF (io_write_nonblock): call no_exception_p (rb_io_write_nonblock): do not check `exception: false' (argf_getpartial): adjust for io_getpartial [ruby-core:69778] [Feature #11318] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-02* 2015-07-03svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-02dir.c: set errnonobu
* dir.c (replace_real_basename): Win32 API does not set errno, get the last error by GetLastError() and map to errno. [Bug #10015] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-02fix typos [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51110 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-02dir.c: show warningsnobu
* dir.c (replace_real_basename): show warnings at errors. [Bug #10015] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-02* gc.c: remove `#define RGENGC_OBJ_INFO 1' line introduced toko1
debug Bug #11244. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-02* gc.c (rb_raw_obj_info): separated from rb_obj_info().ko1
Fill internal object information into passed buffer. * gc.h: declare rb_raw_obj_info(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-02dir.c: update path typenobu
* dir.c (replace_real_basename): update path type by the target attributes if possible, to improve the performance. [Bug #10015] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-02* st.c: get rid of VC++'s warnings of C4700 (uninitialized localusa
variable used). I think that these are wrong, but should shut them up. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-02rubygems.rb: use @gem_prelude_indexnobu
* lib/rubygems.rb (Gem.load_path_insert_index): search @gem_prelude_index first. * lib/rubygems/test_case.rb (Gem::TestCase#setup): keep already expanded paths to prserve instance variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-02ruby.c: copy initial load path marksnobu
* ruby.c (process_options): also copy initial load path marks at setting load paths encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e