aboutsummaryrefslogtreecommitdiffstats
path: root/proc.c
Commit message (Collapse)AuthorAgeFilesLines
* * vm_eval.c (eval_string_with_cref): propagative filename and line_nomame2010-05-091-0/+7
| | | | | | | | | of binding. [ruby-dev:38767] [ruby-core:28307] * vm_core.h (rb_binding_t), proc.c: add filename and line_no fields to preserve them. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (iseq_compile_each), vm_insnhelper.c (vm_invoke_block,mame2010-05-091-4/+2
| | | | | | | | | | | | | | | | | vm_throw): allow "return" and "yield" even in singleton class definition. based on a patch from wanabe <s.wanabe AT gmail.com> for "return". [ruby-core:21379] [ruby-dev:40975] * insns.def (defineclass): ditto (straightforwardly push block ptr, instead of dfp ptr with special flag). * vm_core.h (RUBY_VM_CLASS_SPECIAL_P): ditto (no longer needed). * proc.c (proc_new): ditto (remove handling for special flag). * bootstraptest/test_jump.rb: add tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * proc.c (proc_dup): copy blockprocval. proc_dup is used bymame2010-05-091-0/+1
| | | | | | | define_method, which made blockprocval be GC'ed mistakenly. [ruby-core:30023] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * error.c: RDoc for subclasses of Exception. [ruby-core:28394]marcandre2010-05-081-0/+43
| | | | | | | | | | | | | | | | | | | | | | * cont.c: ditto * enumerator.c: ditto * io.c: ditto * math.c: ditto * numeric.c: ditto * proc.c: ditto * re.c: ditto * thread.c: ditto * transcode.c: ditto. Thanks to Run Paint for some of the documentation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (rb_mark_method_entry): renamed.nobu2010-05-041-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * method.h, vm_method.c: rename some internal functions related toko12010-05-041-1/+1
| | | | | | | | | | | | rb_method_entry_t. rb_add_method_me() -> rb_method_entry_set(). rb_get_method_entry() -> rb_method_entry_without_cache(). rb_gc_mark_method_entry() -> rb_mark_method_entry(). * class.c, proc.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (make_exception, rb_obj_extend): Fix error messages in case of wrongmarcandre2010-04-301-4/+4
| | | | | | | | | | | | | | | | | | | | | number of arguments * file.c (rb_f_test, rb_file_s_umask): ditto * numeric.c (int_chr, num_step): ditto * process.c (rb_f_sleep): ditto * re.c (rb_reg_initialize_m): ditto * signal.c (rb_f_kill, sig_trap): ditto * string.c (rb_str_aref_m, rb_str_aset_m, rb_str_count, rb_str_delete_bang, rb_str_slice_bang, rb_str_sub_bang, str_gsub): ditto * proc.c (curry): rdoc fix git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * proc.c (mnew): fix wrong error message when Kernel#public_methodmame2010-04-221-1/+10
| | | | | | receives name of private method. [Bug #2425] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * proc.c (rb_method_location): return attr's location if it is setup.wanabe2010-03-221-5/+20
| | | | | | | | | | | | | | | | | | | | [Feature #2084] * NEWS: follow above. * vm_method.c (rb_add_method): save attr's location. * gc.c (mark_method_entry): mark attr's location. * method.h (rb_method_definition_t): add member to save attr's location. * vm_eval.c (vm_call0): follow above. * vm_insnhelper.c (vm_call_method): ditto. * vm_method.c (rb_method_definition_eq): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * proc.c (mnew): don't check visibility of method body if publicmame2010-01-081-2/+6
| | | | | | | | ZSUPER method is found. [ruby-dev:39767] * test/ruby/test_method.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rdoc update.akr2009-12-071-6/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_insnhelper.c (vm_push_frame): add CHECK_STACK_OVERFLOW.matz2009-11-071-1/+0
| | | | | | | | | | | | | | | | | [ruby-dev:39592] * eval.c (rb_longjmp): add 1 level backtrace for sysstack_error without calling any method to prevent further stack overflow. * eval.c (make_exception): don't call #exception for sysstack_error to prevent stack overflow. * proc.c (Init_Proc): don't freeze sysstack_error. * eval.c (rb_longjmp): move reentrant check after exception preparation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * proc.c (mnew): Fix scope issue [ruby-core:26069]marcandre2009-11-041-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix typos.akr2009-11-031-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * hash.c (rb_hash_set_default_proc): checks arity of defalt_procmatz2009-10-241-4/+4
| | | | | | of a Hash. [ruby-core:26087] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * proc.c (mnew): Method#new checks for respond_to_missing? with private set ↵marcandre2009-10-131-1/+1
| | | | | | | | to true [ruby-core:26069] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_method.c (rb_add_method_def): show the location wherenobu2009-09-301-3/+5
| | | | | | | overwritten method was defined. [ruby-dev:39400] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25129 ↵matz2009-09-281-17/+20
| | | | b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * proc.c (missing_wrap): reverted.nobu2009-09-251-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * proc.c (missing_wrap): new_arg is already given if argc > 1.nobu2009-09-251-3/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * proc.c (mnew): fix for instance method of Module, BasicObjectnobu2009-09-251-1/+1
| | | | | | | | | and subclass of a class which overrides respond_to_missing?. based on a patch from Nikolai Lugovoi <nlugovoi AT gmail.com> in [ruby-core:25748]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * proc.c (Method#== doc): Fix doc, cf [ruby-core:24791]marcandre2009-09-241-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * proc.c (mnew): generate method object that wraps method_missing,matz2009-09-241-0/+21
| | | | | | | | | when #respond_to_missing? is defined. * test/ruby/test_object.rb (test_respond_to_missing): add test suites for #respond_to_missing? changes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * proc.c (umethod_bind, rb_mod_define_method): Fix bug that disallowed ↵marcandre2009-09-221-4/+5
| | | | | | methods from singleton classes to be used for UnboundMethod#bind, Kernel#define_singleton_method and Module#define_method, even when that singleton class was of the right kind_of. A patch by Shane O'Brien [ruby-core:25632] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * proc.c (rb_mod_define_method): doc fixmarcandre2009-09-221-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_mod_define_method): Doc fix (accepts UnboundMethod too)marcandre2009-09-221-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c, proc.c: added rdoc.nobu2009-09-211-0/+18
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * proc.c (proc_binding): allow proc from method. [ruby-core:25589]nobu2009-09-211-6/+10
| | | | | | | * vm.c (collect_local_variables_in_env): block iseq can be NULL. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (rb_data_type_struct): constified dsize.nobu2009-09-091-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/st.h (st_hash_func): use st_index_t.nobu2009-09-081-8/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * method.h (rb_method_definition_t): split from rb_method_entry_tnobu2009-08-281-33/+52
| | | | | | | | | to deal aliases. [ruby-dev:39165] * proc.c (struct METHOD): contains rb_method_entry_t copy. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * proc.c (rb_method_entry_arity): fixed indent.nobu2009-08-281-13/+13
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * proc.c (rb_method_entry_arity): support not_implemented method.ko12009-07-281-2/+4
| | | | | | | | (I have no idea to test it) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * proc.c (rb_method_entry_arity): support optimized method (send).ko12009-07-281-0/+8
| | | | | | | | * test/ruby/test_method.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * suppressed shorten-64-to-32 warnings.nobu2009-07-181-10/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * method.h, vm_core.h: add rb_method_entry_t. Remove nodes aroundko12009-07-151-109/+97
| | | | | | | | | | | | | | | | | | | | | method management. This change affect some VM control stack structure. * vm.c, vm_insnhelper.c, vm_method.c, vm_eval.c: ditto. and make some refactoring. * insns.def, class.c, eval.c, proc.c, vm_dump.c : ditto. * vm_core.h, compile.c (iseq_specialized_instruction): remove VM_CALL_SEND_BIT. use another optimization tech for Kernel#send. * node.h: remove unused node types. * ext/objspace/objspace.c (count_nodes): ditto. * gc.c: add mark/free functions for method entry. * include/ruby/intern.h: remove decl of rb_define_notimplement_method_id(). nobody can use it because noex is not opend. * iseq.c (iseq_mark): fix to check ic_method is available. * iseq.c (rb_iseq_disasm): fix to use rb_method_get_iseq(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * proc.c (Kernel#define_singleton_method): rdoc. based on a patch byyugui2009-07-131-0/+26
| | | | | | | Marc-Andre Lafortune <ruby-core-mailing-list AT marc-andre.ca>. [ruby-core:23944]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * proc.c ({proc,binding,method}_data_type): typed.nobu2009-07-081-1/+14
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * proc.c ({proc,method}_data_type): typed.nobu2009-07-081-44/+60
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * proc.c (make_curry_proc): should propagate lambda-ness.nobu2009-07-061-2/+10
| | | | | | | [ruby-core:24127] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * proc.c (proc_hash): use long.nobu2009-07-061-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * class.c (rb_define_method_id): use rb_define_notimplement_method_idakr2009-04-161-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | if rb_f_notimplement is given. (rb_define_protected_method): ditto. (rb_define_private_method): ditto. (rb_define_method): use rb_define_method_id. * include/ruby/intern.h (rb_f_notimplement): declared. (rb_define_notimplement_method_id): declared. * proc.c (method_inspect): show not-implemented. * vm_method.c (notimplement_body): new variable. (rb_notimplement_body_p): new function. (rb_method_boundp): return false if not implemented. (rb_f_notimplement): new function. (rb_define_notimplement_method_id): new function. * process.c (rb_f_fork): use rb_f_notimplement if not implemented. * file.c (rb_file_s_lchmod): use rb_f_notimplement if not implemented. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * proc.c (bmcall): should not uninitialized variable. a patch fromnobu2009-03-141-2/+2
| | | | | | | pegacorn at [ruby-dev:38169]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * proc.c (rb_proc_call, bmcall): commit miss.nobu2009-03-141-2/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * proc.c (rb_proc_call, rb_node_arity, bmcall, curry): checksnobu2009-03-141-12/+27
| | | | | | | overflow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * proc.c (rb_proc_call): checks overflow.nobu2009-03-141-1/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * proc.c (rb_proc_arity): commit miss.nobu2009-03-141-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * proc.c (rb_proc_parameters): unnamed_parameters() expects intnobu2009-03-141-12/+13
| | | | | | | not VALUE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* stripped trailing spaces.nobu2009-02-221-68/+68
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_eval.c (eval_string_with_cref): use rb_vm_get_ruby_level_next_cfp()ko12009-02-131-2/+0
| | | | | | | | | | | instead of vm_get_ruby_level_caller_cfp(). checking a upper frame is not enough. [ruby-dev:37984] * proc.c, vm_core.h: declare rb_vm_get_ruby_level_next_cfp() on vm_core.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e