summaryrefslogtreecommitdiff
path: root/proc.c
AgeCommit message (Collapse)Author
2012-07-03* proc.c (rb_vm_rewrite_dfp_in_errinfo): Fix `unexpected return'naruse
occurs when a proc is called in ensure. [Backport #6460] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@36287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-08merge revision(s) 33391:kosaki
* proc.c (proc_call): Update documentation to match argument handling of proc/Proc.new/lambda/->() git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-08merge revision(s) 33390:kosaki
* proc.c (proc_call): Fix documentation of Proc#call vs Proc#===. [Ruby 1.9 - Bug #5349] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-27* backport r33096 from trunk.ktsj
* proc.c (proc_new): force to rewrite errinfo when calling Proc.new in ensure. [Bug #5234] [ruby-core:39125] * vm.c (rb_vm_rewrite_dfp_in_errinfo): new function. * vm.c (vm_make_env_each): changed accordingly. * vm_core.h: ditto. * bootstraptest/test_flow.rb: add tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-28* backport r32671 from trunk.mame
* proc.c: pre-allocate the unlinked_method_entry_list_entry struct to avoid memory allocation during GC. based on a patch from Eric Wong. [ruby-core:38498] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-28* backport r32669 from trunk.mame
* proc.c (struct METHOD), gc.c (gc_marks), vm_method.c (rb_gc_mark_unlinked_live_method_entries): fix SEGV bug. rb_method_entry_t was free'd even when the method is still on the stack if it is BMETHOD (i.e., Method#call). This is because rb_method_entry_t is embedded in struct METHOD. This commit separates them and marks the live method entries. See [ruby-core:38449] in detail. fix [Bug #5047] [ruby-core:38171] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-18* eval.c, hash.c, load.c, proc.c, range.c, thread.c, time.c: don'takr
declare internal functions. * internal.h, vm_core.h: declare internal functions. * array.c: include internal.h. * common.mk: update dependency for array.o. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-18* method.h, internal.h iseq.h: declare internal functions.akr
* compile.c, eval.c, iseq.c, object.c, parse.y, proc.c, process.c, thread.c, vm.c, vm_eval.c, vm_insnhelper.c, vm_method.c: don't declare internal functions. Note that rb_method_entry_eq() is defined in vm_method.c but there was a declaration in proc.c with different const-ness. Now it is declared in method.h with same const-ness to the definition. * object.c (rb_mod_module_exec): don't declare functions declared in include/ruby/intern.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-18* internal.h: declare more internal functions.akr
* iseq.h (rb_method_get_iseq): declared. * compile.c, eval.c, eval_error.c, iseq.c, parse.y, proc.c, range.c, ruby.c, time.c, util.c, vm.c: don't declare internal functions. * eval.c, parse.y, thread_pthread.c: non-existing function declarations removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-17* internal.h: declare internal functions here.akr
* node.h: declare NODE dependent internal functions here. * iseq.h: declare rb_iseq_t dependent internal functions here. * vm_core.h: declare rb_thread_t dependent internal functions here. * bignum.c, class.c, compile.c, complex.c, cont.c, dir.c, encoding.c, enumerator.c, error.c, eval.c, file.c, gc.c, hash.c, inits.c, io.c, iseq.c, load.c, marshal.c, math.c, numeric.c, object.c, parse.y, proc.c, process.c, range.c, rational.c, re.c, ruby.c, string.c, thread.c, time.c, transcode.c, variable.c, vm.c, tool/compile_prelude.rb: don't declare internal functions declared in above headers. include above headers if required. Note that rb_thread_mark() was declared as void rb_thread_mark(rb_thread_t *th) in cont.c but defined as void rb_thread_mark(void *ptr) in vm.c. Now it is declared as the later in internal.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-27* proc.c: Rdoc formatting, clarification & example fixmarcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-18* internal.h: add for internal use only.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-07cancel subversion backfire. sorrymatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-07* gc.c (rb_gc_set_params): allow GC parameter configuration bymatz
environment variables. based on a patch from funny-falcon at https://gist.github.com/856296, but honors safe level. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-05* class.c: fix camelCase to snake_case in documentation code examples.naruse
patched by Andrew Grimm. fixes Bug #4469 * marshal.c: ditto. * proc.c: ditto. * sample/biorhythm.rb: ditto. * vm_eval.c: ditto. * vm_method.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-19 * proc.c (proc_call): Add gc guard to avoid segfault. The fixkosaki
is created by Tomoyuki Chikanaga. [Bug #4238][ruby-dev:42963] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-07* transcode.c (transcode_loop): call default handler of the givennobu
hash, method, proc or [] method as fallback. [ruby-dev:42692] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-18* include/ruby/ruby.h (rb_data_type_t): restructured. [ruby-dev:41862]nobu
add parent member. * error.c (rb_typeddata_inherited_p): new function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-15* proc.c (bm_free): fix memory leak. [ruby-core:30869] [Bug #3466]mame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-29* removed trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-17* proc.c (proc_lambda, unnamed_parameters): Small documentation fixes.marcandre
* re.c: ditto * string.c: ditto * time.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-17* array.c: Documentation: change => in call-seq to ->.marcandre
Harmonize "#=>" in examples. [ruby-core:30206] * bignum.c: ditto * class.c: ditto * compar.c: ditto * cont.c: ditto * dir.c: ditto * encoding.c: ditto * enum.c: ditto * enumerator.c: ditto * error.c: ditto * eval.c: ditto * file.c: ditto * gc.c: ditto * io.c: ditto * load.c: ditto * marshal.c: ditto * math.c: ditto * numeric.c: ditto * object.c: ditto * pack.c: ditto * proc.c: ditto * process.c: ditto * random.c: ditto * range.c: ditto * re.c: ditto * ruby.c: ditto * signal.c: ditto * sprintf.c: ditto * string.c: ditto * struct.c: ditto * thread.c: ditto * time.c: ditto * transcode.c: ditto * variable.c: ditto * vm_eval.c: ditto * vm_method.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-16* proc.c (mnew): initialize a field. a patch from Takahiro Kambe.mame
[ruby-dev:41312] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-16* proc.c (proc_binding): don't propagative filename and line_no ofmame
binding that is created from C level. [ruby-dev:41322] * vm_eval.c (eval_string_with_cref): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-09* vm_eval.c (eval_string_with_cref): propagative filename and line_nomame
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
2010-05-09* compile.c (iseq_compile_each), vm_insnhelper.c (vm_invoke_block,mame
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
2010-05-09* proc.c (proc_dup): copy blockprocval. proc_dup is used bymame
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
2010-05-08* error.c: RDoc for subclasses of Exception. [ruby-core:28394]marcandre
* 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
2010-05-04* gc.c (rb_mark_method_entry): renamed.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-04* method.h, vm_method.c: rename some internal functions related toko1
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
2010-04-30* eval.c (make_exception, rb_obj_extend): Fix error messages in case of wrongmarcandre
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
2010-04-22* proc.c (mnew): fix wrong error message when Kernel#public_methodmame
receives name of private method. [Bug #2425] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-22* proc.c (rb_method_location): return attr's location if it is setup.wanabe
[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
2010-01-08* proc.c (mnew): don't check visibility of method body if publicmame
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
2009-12-07rdoc update.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-07* vm_insnhelper.c (vm_push_frame): add CHECK_STACK_OVERFLOW.matz
[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
2009-11-04* proc.c (mnew): Fix scope issue [ruby-core:26069]marcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-03fix typos.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-24* hash.c (rb_hash_set_default_proc): checks arity of defalt_procmatz
of a Hash. [ruby-core:26087] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-13* proc.c (mnew): Method#new checks for respond_to_missing? with private set ↵marcandre
to true [ruby-core:26069] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-30* vm_method.c (rb_add_method_def): show the location wherenobu
overwritten method was defined. [ruby-dev:39400] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-28git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25129 ↵matz
b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-25* proc.c (missing_wrap): reverted.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-25* proc.c (missing_wrap): new_arg is already given if argc > 1.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-25* proc.c (mnew): fix for instance method of Module, BasicObjectnobu
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
2009-09-24* proc.c (Method#== doc): Fix doc, cf [ruby-core:24791]marcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-24* proc.c (mnew): generate method object that wraps method_missing,matz
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
2009-09-22* proc.c (umethod_bind, rb_mod_define_method): Fix bug that disallowed ↵marcandre
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
2009-09-22* proc.c (rb_mod_define_method): doc fixmarcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-22* eval.c (rb_mod_define_method): Doc fix (accepts UnboundMethod too)marcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e