summaryrefslogtreecommitdiff
path: root/vm_method.c
AgeCommit message (Collapse)Author
2013-02-06vm_method.c: show respond_to locationnobu
* proc.c (rb_method_entry_location, rb_{mod,obj}_method_location): new functions to obtain source location of method definition. * vm_method.c (rb_obj_respond_to): show the location of old style respond_to? method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-05vm_method.c: drop include_all flagnobu
* vm_method.c (rb_obj_respond_to): drop optional include_all flag if respond_to? method is defined in old style. [Bug #7722] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-16vm_method.c: suppress warningsnobu
* vm_method.c (call_cfunc_invoker_func): suppress wrong warnings "C4550: expression evaluates to a function which is missing an argument list." by VC6. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-07* vm_method.c (Init_eval_method): main.public and main.privateshugo
should be private. * proc.c (Init_Proc): main.define_method should be private. * test/ruby/test_module.rb: related test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-30vm_method.c: idRespond_to_missingnobu
* vm_method.c (respond_to_missing): use idRespond_to_missing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-22internal.h: quote unprintablenobu
* internal.h (QUOTE, QUOTE_ID): quote unprintable chars in strings and IDs. [Bug #7574] [ruby-dev:46749] * string.c (rb_str_quote_unprintable): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-17* method.h: remove `VM_METHOD_TYPE_CFUNC_FRAMELESS' method type.ko1
This method type is for optimized CFUNC such as Fixnum#+ and so on. This feature is half-baked and no way to use them. [Background] Now, VM has opt_plus instructions to optimize `+' methods for some Classes (such as Fixnum, Float (flonum)). We call this type of instructions as `specialized instructions'. This simple technique improve simple program dramatically. However, we can make specialized instructions for only several types (classes) and selectors (method names) because a large instruction will be slow. In other words, this technique has no extensibility. To overcome this problem, VM_METHOD_TYPE_CFUNC_FRAMELESS was introduced (r37198). This type is a variant of CFUNC, but called their functiions directly without building a method frame. Any CFUNC method can be defined as frameless methods if a method is not needed to make method frame. Frameless methods are faster as specialized instructions (a bit slower, but no need to care). No problem described at http://charlie.bz/blog/why-do-singleton-methods-make-ruby-slow because this technique doesn't see class, but see method body itself. Alias is also no problem. [Problem] However, we can't set frameless method type for polymorphic methods such as Array#[]. Necessity for method frame depends on which parameter type. For example, Fixnum#+ needs method frame if coerce is needed. Current VM_METHOD_TYPE_CFUNC_FRAMELESS is not flexible and need more tuning to introduce it. Expected behavior of frameless method type may be: result = optimized_cfunc(params); /* call optimized cfunc */ if (result == Qundef) { result = normal_cfunc(); } This is why I say this feature is half-baked. We need to learn primitive method in Smalltalk more. (I heard this name at RubyConf Taiwan this month. Thanks!) [Conclusion] Nobody may use this feature and there is no compatibility issue. This feature goes to next minor (2.1?). * proc.c (rb_method_entry_arity): ditto. * vm_eval.c, vm_insnhelper.c, vm_method.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-10* vm_method.c (rb_method_entry_without_refinements): useshugo
rb_resolve_refined_method() to search superclasses if me->def->orig_me is 0. This change fixes make test-all TESTS="json ruby/test_refinement.rb". * test/ruby/test_refinement.rb: related test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-09* vm_insnhelper.c (vm_call_opt_send): Kernel#send should not useshugo
refinements. * proc.c (mnew): Kernel#method, Kernel#public_method, Module#instance_method, and Module#public_instance_method should not use refinements. * vm_method.c (rb_method_boundp): Kernel#respond_to? should not use refinements. * test/ruby/test_refinement.rb: related test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-06* revised r37993 to avoid SEGV/ILL in tests. In r37993, a methodshugo
entry with VM_METHOD_TYPE_REFINED holds only the original method definition, so ci->me is set to a method entry allocated in the stack, and it causes SEGV/ILL. In this commit, a method entry with VM_METHOD_TYPE_REFINED holds the whole original method entry. Furthermore, rb_thread_mark() is changed to mark cfp->klass to avoid GC for iclasses created by copy_refinement_iclass(). * vm_method.c (rb_method_entry_make): add a method entry with VM_METHOD_TYPE_REFINED to the class refined by the refinement if the target module is a refinement. When a method entry with VM_METHOD_TYPE_UNDEF is invoked by vm_call_method(), a method with the same name is searched in refinements. If such a method is found, the method is invoked. Otherwise, the original method in the refined class (rb_method_definition_t::body.orig_me) is invoked. This change is made to simplify the normal method lookup and to improve the performance of normal method calls. * vm_method.c (EXPR1, search_method, rb_method_entry), vm_eval.c (rb_call0, rb_search_method_entry): do not use refinements for method lookup. * vm_insnhelper.c (vm_call_method): search methods in refinements if ci->me is VM_METHOD_TYPE_REFINED. If the method is called by super (i.e., ci->call == vm_call_super_method), skip the same method entry as the current method to avoid infinite call of the same method. * class.c (include_modules_at): add a refined method entry for each method defined in a module included in a refinement. * class.c (rb_prepend_module): set an empty table to RCLASS_M_TBL(klass) to add refined method entries, because refinements should have priority over prepended modules. * proc.c (mnew): use rb_method_entry_with_refinements() to get a refined method. * vm.c (rb_thread_mark): mark cfp->klass for iclasses created by copy_refinement_iclass(). * vm.c (Init_VM), cont.c (fiber_init): initialize th->cfp->klass. * test/ruby/test_refinement.rb (test_inline_method_cache): do not skip the test because it should pass successfully. * test/ruby/test_refinement.rb (test_redefine_refined_method): new test for the case a refined method is redefined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-01time.c, vm_method.c: update rdocnobu
* time.c (time_{mdump,dump,mload,load): update rdoc. * vm_method.c (obj_respond_to_missing): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-01vm_method.c: privatenobu
* vm_method.c (basic_obj_respond_to): call even if private. [Feature #6539] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-01vm_method.c: make initialize methods privatenobu
* id.c (Init_id), template/id.h.tmpl: add initialize_{copy,clone,dup} and respond_to_missing?. * vm_method.c (rb_method_entry_make): make above methods private. [Feature #6539] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30* revert r37993 to avoid SEGV in tests.shugo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-29* vm_method.c (rb_method_entry_make): add a method entry withshugo
VM_METHOD_TYPE_REFINED to the class refined by the refinement if the target module is a refinement. When a method entry with VM_METHOD_TYPE_UNDEF is invoked by vm_call_method(), a method with the same name is searched in refinements. If such a method is found, the method is invoked. Otherwise, the original method in the refined class (rb_method_definition_t::body.orig_def) is invoked. This change is made to simplify the normal method lookup and to improve the performance of normal method calls. * vm_method.c (EXPR1, search_method, rb_method_entry), vm_eval.c (rb_call0, rb_search_method_entry): do not use refinements for method lookup. * vm_insnhelper.c (vm_call_method): search methods in refinements if ci->me is VM_METHOD_TYPE_REFINED. If the method is called by super (i.e., ci->call == vm_call_super_method), skip the same method entry as the current method to avoid infinite call of the same method. * class.c (include_modules_at): add a refined method entry for each method defined in a module included in a refinement. * class.c (rb_prepend_module): set an empty table to RCLASS_M_TBL(klass) to add refined method entries, because refinements should have priority over prepended modules. * proc.c (mnew): use rb_method_entry_with_refinements() to get a refined method. * test/ruby/test_refinement.rb (test_inline_method_cache): do not skip the test because it should pass successfully. * test/ruby/test_refinement.rb (test_redefine_refined_method): new test for the case a refined method is redefined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-13* vm_insnhelper.c (vm_call_cfunc_with_frame): don't use ci afterko1
EXEC_EVENT_HOOK because ci can be overridden. * vm_eval.c: ditto. * method.h: change invoker's parameters types. * vm_method.c (call_cfunc_invoker_func): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-07* eval.c (rb_mod_refine): set RMODULE_IS_REFINEMENT to a createdshugo
refinement module, and don't override method_added. * vm_method.c (rb_method_entry_make): check redefinition of optimized methods when a method is added to a refinement module. [ruby-core:48970] [Bug #7290] * test/ruby/test_refinement.rb: related test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-25* include/ruby/ruby.h, class.c: remove (revert)ko1
`rb_add_method_cfunc_frameless()' API. This API is not mature to become an offical API. For example, we can not use this API with `rb_define_private_method()'. * method.h, vm_method.c (rb_add_method_cfunc_frameless): removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37320 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-23* vm_core.h, vm_insnhelper.c, vm_eval.c (OPT_CALL_CFUNC_WITHOUT_FRAME):ko1
add a new otpimization and its macro `OPT_CALL_CFUNC_WITHOUT_FRAME'. This optimization makes all cfunc method calls `frameless', which is fster than ordinal cfunc method call. If `frame' is needed (for example, it calls another method with `rb_funcall()'), then build a frame. In other words, this optimization delays frame building. However, to delay the frame building, we need additional overheads: (1) Store the last call information. (2) Check the delayed frame buidling before the frame is needed. (3) Overhead to build a delayed frame. rb_thread_t::passed_ci is storage of delayed cfunc call information. (1) is lightweight because it is only 1 assignment to `passed_ci'. To achieve (2), we modify GET_THREAD() to check `passed_ci' every time. It causes 10% overhead on my envrionment. This optimization only works for cfunc methods which do not need their `frame'. After evaluation on my environment, this optimization does not effective every time. Because of this evaluation results, this optimization is disabled at default. * vm_insnhelper.c, vm.c: add VM_PROFILE* macros to measure behaviour of VM internals. I will extend this feature. * vm_method.c, method.h: change parameters of the `invoker' function. Receive `func' pointer as the first parameter. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-19* method.h (rb_method_cfunc_t::invoker): add new field (func ptr)ko1
`invoker'. `invoker' function invoke cfunc body (rb_method_cfunc_t::func). `invoker' is set at method definition timing. With this change, the big `switch' (branch) in `call_cfunc()' is no longer needed. However, the performance benefit is only a bit. * vm_core.h (rb_call_info_t::aux::func): add a new field to store cfunc body function pointer. * vm_method.c (call_cfunc_invoker_func): add a new function which returns a suitable invoke function. * vm_method.c (setup_method_cfunc_struct): added. * vm_method.c (rb_add_method): fix to set `invoker'. * vm_eval.c (vm_call0_body): catch up above changes. * vm_insnhelper.c (call_cfunc): removed. * vm_insnhelper.c (vm_call_cfunc): fix to call cfunc body with `invoker' function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-18vm_method.c: check arity earliernobu
* vm_method.c (rb_add_method_cfunc, rb_add_method_cfunc_frameless): check arity earlier at definition time. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-18* class.c (rb_define_frameless_method): rename fromko1
rb_define_method_fast(). Defined method with this C API does not make a method frame. It is bit lightweight than ordinal C functions. Now only 0 or 1 argc are permitted. * method.h (VM_METHOD_TYPE_CFUNC_FRAMELESS): rename macro name from VM_METHOD_TYPE_CFUNC_FAST. * vm_insnhelper.c, vm_method.c: rename related functions. * proc.c (rb_method_entry_arity): catch up above changes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-15* method.h: introduce new method type VM_METHOD_TYPE_CFUNC_FAST.ko1
This method is similar to VM_METHOD_TYPE_CFUNC methods, but called cfunc without building new frame (does not push new control frame). If error is occured in cfunc, the backtrace only shows caller frame and upper. This kind of methods can be added by rb_define_method_fast(). This feature is similar to specialized instructions (opt_plus, etc), but more flexible (but a bit slower). * class.c (rb_define_method_fast): added. Maybe it will be renamed soon. * vm_insnhelper.c (vm_call_method): support method type VM_METHOD_TYPE_CFUNC_FAST. * proc.c (rb_method_entry_arity): catch up new method type. * vm_method.c (rb_add_method_cfunc_fast): added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37198 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-08* eval.c, gc.c, iseq.c, node.h, vm_insnhelper.c, vm_insnhelper.h,shugo
vm_method.c: rename omod and overlaid modules to refinements. * eval.c (hidden_identity_hash_new): renamed from identity_hash_new. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-06* vm_opts.h (OPT_GLOBAL_METHOD_CACHE): new build option toshugo
enable/disable global method caching. [ruby-dev:46203] [Bug #7111] * vm_method.c (rb_method_entry_get_with_omod): don't use global method cache if OPT_GLOBAL_METHOD_CACHE is 0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-06* vm_method.c (search_method): check omod only once for performance.shugo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-28* vm_method.c (search_method): copy refinement iclasses to searchshugo
superclasses correctly. * test/ruby/test_refinement.rb: related test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-27* eval.c (rb_overlay_module, rb_mod_refine): accept a module as theshugo
argument of Module#refine. * vm_method.c (search_method): if klass is an iclass, lookup the original module of the iclass in omod in order to allow refinements of modules. * test/ruby/test_refinement.rb: add tests for the above changes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-08internal.h: allocator function in rb_classext_tnobu
* internal.h (struct rb_classext_struct): move allocator function into rb_classext_t from ordinary method table. [ruby-dev:46121] [Feature #6993] * object.c (rb_obj_alloc): call allocator function directly. * vm_method.c (rb_define_alloc_func, rb_undef_alloc_func) (rb_get_alloc_func): use allocator function in rb_classext_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-07* vm_method.c (rb_redefine_opt_method): use RCLASS_ORIGIN to avoidshugo
SEGV when a module-prepended class is refined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-02* eval.c (rb_mod_using): new method Module#using. [experimental]shugo
* eval.c (rb_mod_refine): new method Module#refine. [experimental] * eval.c (f_using): new method Kernel#using. [experimental] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-02* class.c, insns.def, method.h, proc.c, vm.c, vm_core.h, vm_eval.c,shugo
vm_insnhelper.c, vm_insnhelper.h, vm_method.c: add klass to rb_control_frame_t to implement super correctly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-01RB_TYPE_P BUILTIN_TYPEnobu
* string.c, vm_insnhelper.c, vm_method.c: use RB_TYPE_P() and BUILTIN_TYPE() if possible. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-02prepend: fix mixing with includenobu
* class.c (rb_include_module): include modules after the origin. * class.c (include_modules_at): skip prepended modules. * class.c (rb_prepend_module): now basic.klass in ICLASS refers the old original class/module. [ruby-dev:45868][Bug #6662] * class.c (rb_mod_ancestors): ditto. * vm_method.c (search_method): search method entry from the origin iclass. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-27remove from original m_tblnobu
* vm_method.c (remove_method): remove the method from the original m_tbl on a prepended module. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-27Module#prependnobu
* class.c (rb_prepend_module): prepend module into another module. * eval.c (rb_mod_prepend): new method Module#prepend. [Feature #1102] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-27name of klassnobu
* vm_method.c (rb_method_entry_make): use name of klass explicitly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-27NOEX_NOREDEFnobu
* vm_method.c (rb_method_entry_make): use NOEX_NOREDEF itself for the condition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-04* vm_core.h (rb_location_t): fix type and field name.ko1
(1) rename rb_location_t to rb_iseq_location_t. (2) rename field names of rb_iseq_location_t to adjust RubyVM::Backtrace::Location methods. (2-1) filename -> path (2-2) filepath -> absolute_path (2-3) basename -> base_label (2-4) name -> label (3) rename filed name rb_iseq_location_t#line_no to rb_iseq_location_t#first_lineno to clear purpose of this field. (4) The field names rb_binding_t#(filename|line_no) are also renamed to rb_binding_t#(path|first_lineno). * compile.c: apply above changes. * iseq.c: ditto. * proc.c: ditto. * vm*.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-24* vm_method.c (rb_method_defined_by): removed.ko1
nobu pointed out that rb_method_basic_definition_p() is enough for last commit. * error.c, eval_error.c: change for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-24* vm.c: add RubyVM::Backtrace object (btobj).ko1
Backtrace information contains an array consists of location information for each frames by string. RubyVM::Backtrace object is lightweight backtrace information, which contains complete information to generate traditional style backtrace (an array of strings) with faster generation. If someone accesses to backtrace information via Exception#backtrace, then convert a RubyVM::Backtrace object to traditonal style backtrace. This change causes incompatibility on marshal dumpped binary of Exception. If you have any trouble on it, please tell us before Ruby 2.0 release. Note that RubyVM::Backtrace object should not expose Ruby level. * error.c, eval.c, vm_eval.c: ditto. * internal.h: ditto. * eval_error.c: fix to skip "set_backtrace" method invocation in creating an exception object if it call a normal set_backtrace method (defined by core). * test/ruby/test_settracefunc.rb: fix for above change. * vm_method.c (rb_method_defined_by): added. This function checks that the given object responds with the given method by the given cfunc. * benchmark/bm_vm2_raise1.rb, benchmark/bm_vm2_raise2.rb: add to measure exception creation speed. raise1 create exception objects from shallow stack frame. raise2 create exception objects from deep stack frame. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-22* vm_core.h: add a data type rb_location_t to store iseq locationko1
information. rb_location_t#filename, filepath, name and line_no was moved from rb_iseq_t. rb_location_t#basename is a new field which is similar to `name' field without any decoration. `name' field contains some decoration such as `block in foo'. `basename' only contains `foo'. rb_iseq_t contains memory object of rb_location_t. * iseq.c: setup rb_location_t for each rb_iseq_t memory objects. * compile.c, proc.c, vm.c, vm_dump.c, vm_eval.c, vm_insnhelper.c, vm_method.c: support about it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-13* encoding.c (rb_enc_codepoint_len): Use UNREACHABLE to avoid "controldrbrain
reaches end of non-void function" warnings. [ruby-trunk - Bug #6066] * re.c (name_to_backref_number): ditto. * object.c (rb_Float): ditto. * io.c (io_readpartial): ditto. * io.c (io_read_nonblock): ditto. * pack.c (rb_uv_to_utf8): ditto. * proc.c (rb_method_entry_arity): ditto. * vm_method.c (rb_f_notimplement): ditto. * struct.c (rb_struct_aset_id): ditto. * class.c (rb_scan_args): ditto. * process.c (rlimit_resource_type): ditto. * process.c (rlimit_resource_value): ditto. * process.c (p_uid_switch): ditto. * process.c (p_gid_switch): ditto. * ext/digest/digest.c (rb_digest_instance_update): ditto. * ext/digest/digest.c (rb_digest_instance_finish): ditto. * ext/digest/digest.c (rb_digest_instance_reset): ditto. * ext/digest/digest.c (rb_digest_instance_block_length): ditto. * ext/bigdecimal/bigdecimal.c (BigDecimalCmp): ditto. * ext/dl/handle.c (rb_dlhandle_close): ditto. * ext/tk/tcltklib.c (pending_exception_check0): ditto. * ext/tk/tcltklib.c (pending_exception_check1): ditto. * ext/tk/tcltklib.c (ip_cancel_eval_core): ditto. * ext/tk/tcltklib.c (lib_get_reltype_name): ditto. * ext/tk/tcltklib.c (create_dummy_encoding_for_tk_core): ditto. * ext/tk/tkutil/tkutil.c (tk_hash_kv): ditto. * ext/openssl/ossl_ssl.c (ossl_ssl_session_reused): ditto. * ext/openssl/ossl_pkey_ec.c (ossl_ec_key_dsa_verify_asn1): ditto. * ext/openssl/ossl_pkey_ec.c (ossl_ec_point_is_at_infinit): ditto. * ext/openssl/ossl_pkey_ec.c (ossl_ec_point_is_on_curve): ditto. * ext/fiddle/conversions.c (generic_to_value): ditto. * ext/socket/raddrinfo.c (rsock_io_socket_addrinfo): ditto. * ext/socket/socket.c (sock_s_getnameinfo): ditto. * ext/ripper/eventids2.c (ripper_token2eventid): ditto. * cont.c (return_fiber): ditto. * dmydln.c (dln_load): ditto. * vm_insnhelper.c (vm_search_normal_superclass): ditto. * bignum.c (big_fdiv): ditto. * marshal.c (r_symlink): ditto. * marshal.c (r_symbol): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-02check_definition: duplicated codenobu
* vm_method.c (check_definition): moved duplicated code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-15* adjust style.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-12* vm_method.c (Init_eval_method): respond_to? andnobu
respond_to_missing? are public. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-12* vm_method.c (Init_eval_method): copy basic methods to Exception.nobu
[ruby-core:40287][Bug #5473] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-21* proc.c (method_hash, proc_hash): Fix {Unbound}Method#hashmarcandre
[Bug #6048]. Isolate hash computation for proc * internal.h: Declaration for above * vm_method.c (rb_method_definition_hash): Computation for hash part of a method definition * method.h: Declaration for above * test/ruby/test_method.rb: Test for above git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-13* vm_method.c (rb_method_boundp):knu
obj.respond_to?(:a_protected_method) should return false because calling a protected method may cause NoMethodError if called from outside the class inheritance tree. Kernel#respond_to? is mostly used to test if it is safe to call a method, so the false positive should be avoided. [ruby-dev:40461] [ruby-dev:41739] [ruby-dev:41837] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-03* variable.c (set_const_visibility): print a warning when no argumentmame
is passwd to Module#private_constant. [ruby-list:48558] * vm_method.c (set_method_visibility): ditto for Module#private_class_method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e