aboutsummaryrefslogtreecommitdiffstats
path: root/eval.c
Commit message (Collapse)AuthorAgeFilesLines
* * eval.c (rb_require_safe): prevent extension from loading twice.nobu2006-09-101-7/+7
| | | | | | | fixed: [ruby-dev:29523] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_f_local_variables): list symbols.matz2006-09-041-2/+2
| | | | | | | | | | | | | * struct.c (rb_struct_s_members_m): ditto. * variable.c (ivar_i): ditto. * variable.c (gvar_i): ditto. * variable.c (cv_i): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.h (struct RArray): embed small arrays.matz2006-09-021-63/+58
| | | | | | | | | | (RARRAY_LEN): defined for accessing array members. (RARRAY_PTR): ditto. * array.c: use RARRAY_LEN and RARRAY_PTR. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_eval): should handle when in else clause. a patchmatz2006-09-021-16/+3
| | | | | | | | | from Eric Hodel <drbrain at segment7.net>. [ruby-core:08662] * parse.y (primary): wrap with NODE_CASE. [ruby-core:08663] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (search_required): use RSTRING_PTR and RSTRING_STR.usa2006-08-311-1/+1
| | | | | | | | | | | * object.c (nil_plus): ditto. * ext/dl/cptr.c (rb_dlptr_s_to_ptr): ditto. * ext/openssl/ossl_x509ext.c (ossl_x509extfactory_create_ext): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.h (struct RString): embed small strings.matz2006-08-311-30/+33
| | | | | | | | | | (RSTRING_LEN): defined for accessing string members. (RSTRING_PTR): ditto. * string.c: use RSTRING_LEN and RSTRING_PTR. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (ruby_init): rename top_cref to ruby_top_cref and export,why2006-08-311-5/+5
| | | | | | | | | along with ruby_cref, for use by the sandbox. [ruby-core:08762] * node.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert.drbrain2006-08-281-3/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Include attributiondrbrain2006-08-271-2/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ansificated.akr2006-08-131-9/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * dln.c, eval.c, gc.c, ruby.h: shut up AIX alloca warning.matz2006-08-071-3/+1
| | | | | | | [ruby-dev:29191] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_call0): trace call/return of method defined from block.nobu2006-07-301-0/+8
| | | | | | | fixed: [ruby-core:08329] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_trap_eval): make the current thread runnable to deal withnobu2006-07-301-0/+1
| | | | | | | exceptions which occurred within the trap. fixed: [ruby-dev:27729] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_call): fixed typo in cache look-up. [ruby-dev:29167]matz2006-07-281-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_call): a bug in method cache look-up.matz2006-07-281-2/+2
| | | | | | | http://www.rubyist.net/~matz/20060720.html#c04 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (Init_eval): rename #invoke_method andmatz2006-07-261-10/+13
| | | | | | | | | | | | | | | #invoke_functional_method to __send and __send! respectively. * eval.c (remove_method): prohibit removing __send and __send!. * eval.c (rb_undef): prohibit undef'ing __send and __send!. * eval.c (rb_eval): prohibit redefining __send and __send!. * lib/delegate.rb (Delegator): preserve __send. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (backtrace): porting miss.nobu2006-07-241-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (backtrace): skip frames successive on node and method name.nobu2006-07-241-1/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_call0): revert last change. [ruby-dev:29112]matz2006-07-241-1/+0
| | | | | | | [ruby-core:08374] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_call0): include funcalled methods in caller list.nobu2006-07-211-0/+1
| | | | | | | fixed: [ruby-core:08290] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_call): try local method look-up first for fcall, thenmatz2006-07-201-25/+41
| | | | | | | | | | | | normal method look-up. [ruby-talk:202564] * eval.c (rb_get_method_body): save local method cache separately. * eval.c (search_method): export info whether method is local or not. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_yield_0): should check args_args before lambdamatz2006-07-191-2/+3
| | | | | | | argument check. [ruby-dev:29029] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (yield_under_i): argument should be passed in avaluematz2006-07-181-1/+3
| | | | | | | from. [ruby-dev:29044] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* // comment removed.akr2006-07-151-1/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (f_args): allow post mandatory arguments after optionalmatz2006-07-121-4/+4
| | | | | | | | | | | | | arguments. [ruby-dev:29014] * parse.y (new_args_gen): allow post_args without rest_args. * eval.c (formal_assign): ditto. * parse.y (new_args_gen): check post argument duplication. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (rb_int2big): use SIGNED_VALUE. [ruby-dev:29019]matz2006-07-111-2/+5
| | | | | | | | | | | | | | | * bignum.c (rb_int2inum, rb_uint2inum): use VALUE sized integer. * bignum.c (rb_big2long, rb_big2ulong): ditto. * numeric.c (rb_num2long, rb_num2ulong): ditto. * numeric.c (check_int, check_uint): ditto. * bignum.c (rb_quad_pack): typo fixed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* remove an unused label and variable.akr2006-07-111-2/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_call): remove erroneously restored prot_tag->blkidmatz2006-07-101-1/+0
| | | | | | | initialization. [ruby-dev:28997] [ruby-dev:29000] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (proc_invoke): should not overwrite block information inmatz2006-07-101-36/+59
| | | | | | | | | | | | | | | | current frame. [ruby-dev:28957] * eval.c (rb_yield_0): retrieve proper block object from the frame record. * eval.c (proc_alloc): return preserved block object if it's available. * st.h (st_data_t): use pointer sized integer for st_data_t. [ruby-dev:28988] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_clear_cache_for_remove): clear entries for includednobu2006-07-101-1/+2
| | | | | | | module. fixed: [ruby-core:08180] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (next_jump): deal with destination of next.nobu2006-07-081-3/+29
| | | | | | | fixed: [ruby-core:08169] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_call): should not set prot_tag->blkid since it wouldmatz2006-07-041-7/+11
| | | | | | | never catch breaks at this level. [ruby-dev:28922] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (PUSH_FRAME): initialize frame->self. [ruby-dev:28911]matz2006-07-011-0/+1
| | | | | | | | | | | * configure.in: should test isinf for Solaris with GCC compiler. a patch from <ville.mattila at stonesoft.com>. [ruby-core:07791] * configure.in: -shared patch from Andrew Morrow <andrew.c.morrow at gmail.com>. [ruby-core:08100] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y: use ARGSPUSH instead of ARGSCAT to prevent too muchmatz2006-06-291-0/+6
| | | | | | | | | | | | | | | splat expansion. * eval.c (when_check): need to handle ARGSPUSH as well. * eval.c (block_orphan): lambda and proc from method are always orphan. * gc.c (gc_mark_children): proper marking for NODE_BLOCK_PASS and NODE_LAMBDA. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (SETUP_ARGS0): avoid GC problem.akr2006-06-291-1/+2
| | | | | | | [ruby-dev:28902] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (when_check): arbitrary values are allowed after splats.nobu2006-06-281-1/+2
| | | | | | | fixed: [ruby-dev:28879] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_eval): problem to handle else part. [ruby-dev:28873]matz2006-06-271-1/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_eval): support splat in when expression list.matz2006-06-271-52/+55
| | | | | | | | | | | [ruby-dev:28822] * eval.c (when_check): a new auxiliary function for case match. * eval.c (when_cond): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c: RDoc update for =~ method. a patch from Alex Youngmatz2006-06-271-17/+30
| | | | | | | | | | | | | | | | <alex at blackkettle.org>. [ruby-core:08068] * io.c (pipe_open): backout unnecessary fix on 2006-06-26. [ruby-dev:28865] * eval.c (rb_yield_0): exact argument number check now done only for lambda Proc. * eval.c (rb_yield_0): add check for number of arguments, if there's one lambda block parameter. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_yield_0): avoid core dump. [ruby-dev:28840]akr2006-06-271-1/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (call_trace_func): no check for argument number of thenobu2006-06-261-1/+1
| | | | | | | callback. fixed: [ruby-dev:28812] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_eval): use rb_ary_new2 instead of rb_ary_new4 to avoidakr2006-06-241-2/+2
| | | | | | | | | | | | GC problem. (rb_yield_values): use rb_ary_new2 instead of rb_ary_new4. * array.c (rb_ary_new4): don't set len as n. make it safe with GC. [ruby-dev:28826] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_block_pass): removed.nobu2006-06-231-80/+2
| | | | | | | | * eval.c (rb_thread_start_1): use rb_proc_yield() instead of rb_block_pass(). fixed: [ruby-dev:28794] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (block_param): do not use multiple assignment for a solematz2006-06-211-4/+11
| | | | | | | | | | | | | | | block parameter. [ruby-dev:28710] * eval.c (rb_yield_0): pass a raw yielded value to a sole block parameter if a value is passed by yield. * eval.c (proc_invoke): args may not be an array. * eval.c (rb_proc_yield): pass original value without wrapping it in an array. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c, file.c, etc.: code-cleanup patch from Stefan Huehnermatz2006-06-201-33/+15
| | | | | | | <stefan at huehner.org>. [ruby-core:08029] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (proc_invoke): intercept break and return from lambdamatz2006-06-201-44/+37
| | | | | | | | | | | | | | | | | | | | | | | | Proc objects. [ruby-dev:28742] * eval.c (proc_invoke): remove unnecessary YIELD_PROC_CALL flag. * eval.c (YIELD_EXACT_ARGS): renamed from YIELD_LAMBDA_CALL, which is no longer related to the behavior turned on by this flag. * eval.c (return_jump): no need to care about PROT_YIELD. * eval.c (break_jump): no jump to toplevel PROT_TREAD tag. * eval.c (rb_yield_0): fix confusion between lambda (which is a property of a proc) and pcall (which depends on whether it's called via yield or call). * eval.c (rb_thread_yield): no need to specify YIELD_LAMBDA_CALL. * eval.c (rb_block_pass): update blkid in prot_tag. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10338 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (Init_eval): add aliases invoke_method andmatz2006-06-171-0/+2
| | | | | | | | | | | | | | | | | | invoke_functional_method corresponding send and funcall respectively. [ruby-talk:197512] * parse.y (parser_yylex): returns the most typical keyword token on EXPR_FNAME. [ruby-core:7995] * ext/socket/socket.c: protoize. * parse.y (then): remove ':' from 'then' and 'do' rules. * hash.c (env_aset): raise TypeError on nil with more descriptive message. [ruby-core:07990] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_proc_arity): get rid of segfault for mere splat.nobu2006-06-151-1/+1
| | | | | | | * gc.c (gc_mark_children): NODE_BLOCK_PASS needs u3 to be marked. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_f_method_name, rb_f_callee_name): document typo.usa2006-06-141-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/socket.c (Init_socket): remove obsolete constants:matz2006-06-131-6/+10
| | | | | | | | | | | | | | | | | | | IPsocket, TCPsocket, SOCKSsocket, TCPserver, UDPsocket, UNIXsocket, UNIXserver. * eval.c (formal_assign): post splat arguments should have had higher priority than optional arguments, since they are mandatory. [ruby-dev:28715] * eval.c (VIS_MASK): broken. should be 15. [ruby-dev:28715] * io.c (argf_getc): should return one-character string. [ruby-dev:28715] * io.c (rb_io_readchar): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e