summaryrefslogtreecommitdiffstats
path: root/eval.c
Commit message (Collapse)AuthorAgeFilesLines
* * eval.c (rb_thread_save_context): should not recycle scope object usednobu2005-12-311-0/+1
| | | | | | | in a thread. fixed: [ruby-dev:28177] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* avoid a GC problem with RUBY_ALWAYS_GC= ./ruby -e ''.akr2005-12-291-1/+4
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_gc_mark_threads): leave unmarked threads which won't wakenobu2005-12-291-0/+36
| | | | | | | | | | up alone, and mark threads in the loading table. [ruby-dev:28154] * eval.c (rb_gc_abort_threads), gc.c (gc_sweep): kill unmarked threads. [ruby-dev:28172] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_eval), gc.c (gc_mark_children), node.h (NEW_ALIAS,nobu2005-12-261-3/+4
| | | | | | | | | NEW_VALIAS), parse.y (fitem): allow dynamic symbols to NODE_UNDEF and NODE_ALIAS. backported from trunk. fixed: [ruby-dev:28105] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (ev_const_get): fixed a bug in constant reference duringmatz2005-12-261-11/+14
| | | | | | | | | | | | | instance_eval. [yarv-dev:707] * eval.c (ev_const_defined): ditto. * lib/yaml.rb (YAML::add_domain_type): typo fixed. a patch from Joel VanderWerf <vjoel at path.berkeley.edu>. [ruby-talk:165285] [ruby-core:6995] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (eval_under_i): evaluate source in caller's frame.nobu2005-12-201-2/+7
| | | | | | | | | | [ruby-dev:28076] * eval.c (rb_call_super): use original method name on exception. [ruby-dev:28078] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (bmcall): fix a GC problem by tail call onakr2005-12-161-1/+4
| | | | | | | IA64 with gcc 4.0.3 20051216 (prerelease). git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* precedes registering global VALUE variables before initializing it.akr2005-12-121-4/+4
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/digest.c (rb_digest_base_s_digest): add volatile tomatz2005-12-121-3/+3
| | | | | | | | | | | protect temporary context object. [ruby-dev:27979] * ext/iconv/iconv.c (Init_iconv): rb_gc_register_address() should be called before actual variable initialization. [ruby-dev:27986] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (umethod_bind): adjust invoking class for module method.nobu2005-12-071-3/+13
| | | | | | | [ruby-dev:27964] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (call_trace_func): klass parameter should be amatz2005-12-071-1/+1
| | | | | | | class/module that defines calling method. [ruby-talk:169307] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (exec_under): avoid accessing ruby_frame->prev.matz2005-12-061-1/+1
| | | | | | | [ruby-dev:27948] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_funcall2): allow to call protected methods.nobu2005-11-301-3/+3
| | | | | | | fixed: [ruby-dev:27890] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_call_super): should call method_missing if super ismatz2005-11-011-5/+10
| | | | | | | | | | called from Kernel method. * eval.c (exec_under): frame during eval should preserve external information. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * rubysig.h (CHECK_INTS): prevent signal handler to run duringmatz2005-10-191-7/+6
| | | | | | | | | | | | | | | | critical section. [ruby-core:04039] * eval.c (load_wait): need not to call rb_thread_schedule() explicitly. [ruby-core:04039] * eval.c (rb_thread_schedule): clear rb_thread_critical. [ruby-core:04039] * st.c (st_free_table): do not call free() but xfree(). [ruby-core:06205] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c, gc.c, time.c: made internal symbols static. [ruby-dev:27435]nobu2005-10-181-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_obj_respond_to): check if obj responds to the givennobu2005-10-111-9/+20
| | | | | | | | | method with the given visibility. [ruby-dev:27408] * eval.c (rb_respond_to): conform to Object#respond_to?. [ruby-dev:27411] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (Init_Binding): add Binding#dup method. [yarv-dev:666]nobu2005-10-081-0/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * evalc. (rb_f_send): underscores need to be escaped.nobu2005-09-281-1/+1
| | | | | | | fixed by Doug Kearns. [ruby-core:06053] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (ev_const_get), variable.c (rb_const_get_0): retry only whennobu2005-09-281-1/+1
| | | | | | | | | | autoload succeeded. * variable.c (rb_autoload_load): now return true if autoload succeeded. fixed: [ruby-dev:27331] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (set_trace_func): add rb_secure(4) to prevent addingmatz2005-09-261-0/+1
| | | | | | | | | | tracing function. * lib/delegate.rb: document update from James Edward Gray II <james@grayproductions.net>. [ruby-core:05942] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (unknown_node): show more information. [ruby-dev:26196]akr2005-09-241-1/+9
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (thread_mark): mark th->last_status. [ruby-dev:27179]akr2005-09-201-0/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (BEGIN_CALLARGS): pop halfly pushed status.nobu2005-09-131-1/+3
| | | | | | | fixed: [ruby-dev:26881] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_call0): prohibit calling tainted method (>2) whenmatz2005-09-091-5/+17
| | | | | | | | | | $SAFE == 0. * sprintf.c (rb_f_sprintf): warn "too many argument" on verbose mode (-v/-w); backported from 1.9. [ruby-dev:26963] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_thread_switch): convert all exceptions tonobu2005-09-071-0/+4
| | | | | | | | | | SystemExit. fixed: [ruby-core:05724] * eval.c (rb_thread_terminated): show backtrace before propagate exceptions to main thread. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_call0): wrong condition for $SAFE restoration.matz2005-09-011-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (method_arity): should return proper arity value.matz2005-09-011-25/+23
| | | | | | | | | | | | | [ruby-dev:26390] * eval.c (rb_add_method): preserve safe level in the environment where a method is defined . * eval.c (rb_call0): restore preserved safe level in the method execution. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_rescue2): intialization miss. fixed: [ruby-dev:26917]nobu2005-08-301-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (terminate_process): take String message.nobu2005-08-171-10/+9
| | | | | | | | * eval.c (rb_thread_switch): propagate the exception caused thread termination directly. fixed: [ruby-core:05552] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_mod_autoload_p, rb_f_autoload_p): added rdoc.nobu2005-08-161-6/+21
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@8992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_rescue2): reduce PUSH_TAG() as well as NODE_RESCUE.nobu2005-08-141-21/+16
| | | | | | | | | [ruby-dev:26800] * range.c (range_check, range_init): reduce uselse exceptions. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@8988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_block_pass): distinguish current block from others.nobu2005-08-131-1/+3
| | | | | | | fixed: [ruby-dev:26274] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@8981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_yield_0): push yielded node instead of yielding.nobu2005-07-291-0/+1
| | | | | | | fixed: [yarv-dev:549] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@8864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (obj_free): make message formant consistent with one frommatz2005-07-271-2/+2
| | | | | | | gc_mark(). [ruby-talk:149668] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@8851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* revered all LLP64 modifies due to portability reason.matz2005-07-271-10/+10
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@8846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (id2ref): must not assign pointers to long int. usematz2005-07-271-11/+11
| | | | | | | | | | | | | | | | | LONG_LONG instead if SIZEOF_LONG < SIZEOF_VOIDP. [ruby-talk:149645] * ruby.h: use LONG_LONG to simplify the change. [ruby-talk:149645] * eval.c (rb_f_throw): replace all '0x%lx' by '%p'. [ruby-talk:149553] * missing/vsnprintf.c (BSD_vfprintf): '%p' need to handle 64bit size pointer. [ruby-talk:149553] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@8845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * error.c (syserr_initialize): add 1 byte for snprintf() size formatz2005-07-191-2/+2
| | | | | | | NUL at the end. [ruby-dev:26574] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@8802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_inspect): replace sprintf() with "%s" format allmatz2005-07-191-7/+12
| | | | | | | | | | over the place by snprintf() to avoid integer overflow. * sample/svr.rb: service can be stopped by ill-behaved client; use tsvr.rb instead. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@8799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_call0): make the pointer to NODE volatileocean2005-07-181-1/+1
| | | | | | | instead of NODE itself. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@8793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_call0): make body volatile to avoid optimization problem.akr2005-07-181-1/+1
| | | | | | | [ruby-dev:26195] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@8791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_thread_save_context): must not switch contexts duringnobu2005-07-051-1/+3
| | | | | | | re-allocating stack. fixed: [ruby-core:05219] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@8726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * defines.h (FLUSH_REGISTER_WINDOWS): defined for IA64.akr2005-07-021-0/+10
| | | | | | | | | (flush_register_windows): declare flush_register_windows. * eval.c (flush_register_windows): new function. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@8699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_eval): pre-evaluate argument for unambiguousmatz2005-06-301-5/+7
| | | | | | | | | | | | | | evaluation order. [ruby-dev:26383] * lib/delegate.rb (Delegator::method_missing): forward unknown method to the destination. suggested by <christophe.poucet@gmail.com>. [ruby-talk:146776] * process.c (detach_process_watcher): terminate process watcher thread right after rb_waitpid() succeed. [ruby-talk:146430] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@8676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * dir.c, eval.c, hash.c, process.c, ruby.c: avoid warning "unusedocean2005-06-281-3/+6
| | | | | | | | | variable" [ruby-dev:26387] (patch from Kazuhiro NISHIYAMA) git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@8670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (FUNCTION_CALL_MAY_RETURN_TWICE): DUMMY_SETJMP is replacedakr2005-06-201-11/+29
| | | | | | | | because setjmp is not enough to fix getcontext and SPARC register window problem. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@8651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * signal.c (sigexit): call rb_thread_signal_exit() instead ofmatz2005-06-121-4/+35
| | | | | | | | | | | | | | | | | | | | | | | rb_exit(). [ruby-dev:26347] * eval.c (rb_thread_signal_exit): a new function to exit on main thread. * eval.c (rb_thread_switch): exit status should be retrieved from ruby_errinfo. * eval.c (rb_f_exit): ensure exit(0) should call exit(EXIT_SUCCESS). * missing/mkdir.c: remove. [ruby-core:05177] * lib/delegate.rb (SimpleDelegator::__setobj__): need check for recursive delegation. [ruby-core:04940] * misc/ruby-mode.el (ruby-expr-beg): fix looking point drift. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@8614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (ruby_longjmp): new macro to call longjmp, setcontext, etc.akr2005-06-091-15/+42
| | | | | | | | | | | | (ruby_setjmp): new macro to call setjmp, getcontext, etc. (ruby_setjmp): call setjmp before getcontext to avoid IA64 register stack problem. [ruby-talk:144939] * gc.c (Init_stack): remove IA64_MAGIC_STACK_LIMIT. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@8601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c (enum_min_by, enum_max_by): return nil if no iteration.nobu2005-06-071-5/+11
| | | | | | | | | | | fixed: [ruby-dev:26245] * eval.c (rb_need_block): ensure a block is given. * eval.c (backtrace): skip successive frames sharing same node. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@8590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ChangeLog: fix entry format.nobu2005-05-251-1/+1
| | | | | | | * eval.c (ruby_init): fix indent. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@8526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e