summaryrefslogtreecommitdiff
path: root/eval.c
AgeCommit message (Collapse)Author
2005-12-29avoid a GC problem with RUBY_ALWAYS_GC= ./ruby -e ''.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-12-29* eval.c (rb_gc_mark_threads): keep unmarked threads which won't wakenobu
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: svn+ssh://ci.ruby-lang.org/ruby/trunk@9759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-12-29* eval.c (rb_mod_define_method): should save safe_level in thematz
proc object. [ruby-dev:28146] * test/drb/drbtest.rb (DRbService::self.ext_service): increase timeout limit. a patch from Kazuhiro NISHIYAMA <zn at mbf.nifty.com>. [ruby-dev:28132] * eval.c (ev_const_get): fixed a bug in constant reference during 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] * ext/digest/sha2/sha2.c (ULL): support AIX C. a patch from Kailden <kailden at gmail.com>. [ruby-core:06984] * ext/syck/rubyext.c (rb_syck_compile): avoid potential memory leak. * ext/syck/rubyext.c (syck_set_ivars): avoid potential memory leak by explicit symbol allocation. * lib/delegate.rb (Delegator::method_missing): should delegate block as well. * lib/cgi.rb (CGI::QueryExtension::MorphingBody): fix criteria to use Tempfile. A fix from Zev Blut <rubyzbibd at ubit.com>. [ruby-core:06076] * string.c: remove global functions work on $_. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-12-27* eval.c (struct thread): add bstr_max.akr
(rb_thread_save_context): use realloc instead of REALLOC_N to avoid GC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-12-27* configure.in: define IA64 for portability. (HP aC++/ANSI C doesn'takr
define __ia64__.) don't check libunwind stuff. check __libc_ia64_register_backing_store_base. * defines.h: declare rb_ia64_bsp and rb_ia64_flushrs. (flush_register_windows): call rb_ia64_flushrs on IA64. * ia64.s: new file for IA64. it is separated from C program files because Intel C++ Compiler for IA64 doesn't support inline assembly. * common.mk (ia64.$(OBJEXT)): new target. * ruby.h (RUBY_INIT_STACK): defined. (ruby_init_stack): declared for RUBY_INIT_STACK. * main.c (main): precedes RUBY_INIT_STACK before ruby_init. * gc.c (rb_gc_register_stack_start): new global variable on IA64. (garbage_collect): simplify register stack marking code. don't use libunwind. (Init_stack): initialize rb_gc_register_stack_start. (ruby_init_stack): new function for RUBY_INIT_STACK. * eval.c (struct thread): add bstr_pos member for original position of register stack. (rb_thread_save_context): simplify register stack saving code. don't use libunwind. (rb_thread_restore_context_0): new function. moved from rb_thread_restore_context except the stack position checking code. don't use libunwind for IA64 register stack. (register_stack_extend): new function. (stack_extend): make it self-recursive with the stack position checking code in old rb_thread_restore_context. (rb_thread_restore_context): just call stack_extend. (flush_register_windows): removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-12-20* eval.c (eval_under_i): evaluate source in caller's frame.nobu
[ruby-dev:28076] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-12-19simplify previous change.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-12-19* eval.c (FUNCTION_CALL_MAY_RETURN_TWICE): activate onlyakr
before gcc 4.0.3 on SPARC and IA64. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-12-16* eval.c (bmcall): fix a GC problem by tail call onakr
IA64 with gcc 4.0.3 20051216 (prerelease). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-12-12precedes registering global VALUE variables before initializing it.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-12-12* ext/digest/digest.c (rb_digest_base_s_digest): add volatile tomatz
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: svn+ssh://ci.ruby-lang.org/ruby/trunk@9673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-12-09* eval.c (calling_scope_t): gave names to magic numbers for rb_call().nobu
[ruby-dev:27978] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9665 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-12-07* eval.c (umethod_bind): adjust invoking class for module method.nobu
[ruby-dev:27964] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-12-07* eval.c (call_trace_func): klass parameter should be amatz
class/module that defines calling method. [ruby-talk:169307] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-12-06* gc.c (ruby_xmalloc2): change check for integer overflow.matz
[ruby-dev:27399] * gc.c (ruby_xrealloc2): ditto. * eval.c (exec_under): avoid accessing ruby_frame->prev. [ruby-dev:27948] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-30* eval.c (rb_funcall2): allow to call protected methods.nobu
fixed: [ruby-dev:27890] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-11* configure.in, eval.c, intern.h: check fd_mask type.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-11* eval.c, intern.h: failed to compile where NFDBITS is defined butocean
howmany() is not defined. [ruby-dev:27680] * io.c (is_socket): failed to compile where S_ISSOCK is not defined. * io.c (pipe_open): failed to compile where socketpair is not supported. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-08* intern.h, eval.c (rb_thread_signal_raise): costified.ocean
* signal.c: cosmetic change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-01* eval.c (rb_call_super): should call method_missing if super ismatz
called from Kernel method. * eval.c (exec_under): frame during eval should preserve external information. * configure.in: use proper option for Sun linker. A patch from Shinya Kuwamura <kuwa@labs.fujitsu.com>. [ruby-dev:27603] * numeric.c (fix_rshift): RDoc fix. [ruby-core:6351] * util.h (strtod): add #undef for platforms defines strtod() macro. [ruby-dev:27563] * ext/etc/etc.c: document update from mathew <meta@pobox.com>. [ruby-core:06473] * ext/fcntl/fcntl.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-21* bin/erb (ERB::Main::run): typo fixed. [ruby-core:06337]matz
* env.h: move struct METHOD and struct BLOCK from eval.c to support NodeWrap and ParseTree. * rubysig.h (CHECK_INTS): prevent signal handler to run during 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] * eval.c (rb_obj_instance_exec): create instance_exec and module_exec which pass arguments to the block. * eval.c (rb_f_funcall): rename fcall to funcall to follow tradition. * st.c (st_free_table): do not call free() but xfree(). [ruby-core:06205] * eval.c (splat_value): call rb_Array() to convert svalue to values. [ruby-dev:27397] * lib/cgi.rb (CGI::Cookie::parse): Cookies from Nokia devices may not be parsed correctly. A patch from August Z. Flatby (augustzf) in [ruby-Patches-2595]. [ruby-core:06183] * object.c (rb_Array): Array() to raise error for objects without to_ary, nor to_a. * object.c (nil_to_a): revert NilClass#to_a. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-20* class.c, eval.c, hash.c, st.c, variable.c: changed /* ??? */ stuffocean
protoize generated to ANYARGS. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-20* eval.c, file.c, ruby.c: removed strchr, strrchr, strstr definitionocean
because they are defined in missing.h. * missing.h, missing/strchr.c, missing/strstr.c: ANSI styled. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-18* enumerator.c, eval.c, gc.c, parse.y, regparse.c, sjis.c, time.c:nobu
made internal symbols static. [ruby-dev:27435] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-11* eval.c (rb_obj_respond_to): check if obj responds to the givennobu
method with the given visibility. [ruby-dev:27408] * eval.c (rb_respond_to): conform to Object#respond_to?. [ruby-dev:27411] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-11* array.c, enum.c, eval.c, util.c: safer function pointer usage.nobu
fixed: [ruby-core:06143] * util.h (qsort): removed the definition incompatible to ANSI. fixed: [ruby-core:06147] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-08* eval.c (Init_Binding): add Binding#dup method. [yarv-dev:666]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-05* range.c (rb_range_beg_len): should return Qfalse for non-rangematz
object. * pack.c (EXTEND16): [ruby-dev:27383] * eval.c (set_trace_func): add rb_secure(4) to prevent adding tracing function. * lib/delegate.rb: document update from James Edward Gray II <james@grayproductions.net>. [ruby-core:05942] * process.c (proc_daemon): should restrict execution on levels higher than $SAFE=2. suggested by URABE Shyouhei <shyouhei@ice.uec.ac.jp>. * lib/forwardable.rb: replaced by new implementation from <Daniel.Berger@qwest.com>. [ruby-core:05899] * file.c (path_check_0): disallow sticky world writable directory in PATH (and $LOAD_PATH). [ruby-dev:27226] * numeric.c (fix_idiv): 1.div(1.0) should return integer value. [ruby-dev:27235] * lib/yaml.rb: require 'yaml/constants'. [ruby-core:5776] * lib/xmlrpc/client.rb (XMLRPC::Client::do_rpc): add charset information to content-type header.[ruby-core:5127] * lib/xmlrpc/server.rb (CGIServer::serve): ditto. * lib/xmlrpc/server.rb (ModRubyServer::serve): ditto. * lib/xmlrpc/server.rb (WEBrickServlet::service): ditto. * test/dbm/test_dbm.rb (TestDBM::test_s_open_error): remove test_s_open_error test to detect duplicate open. [ruby-dev:27202] * eval.c (splat_value): use to_a to splat non Array object. * object.c (nil_to_a): remove nil.to_a. [experimental] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-28* evalc. (rb_f_send): underscores need to be escaped.nobu
fixed by Doug Kearns. [ruby-core:06053] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-28* eval.c (ev_const_get), variable.c (rb_const_get_0): retry only whennobu
autoload succeeded. * variable.c (rb_autoload_load): now return true if autoload succeeded. fixed: [ruby-dev:27331] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-20* eval.c (thread_mark): mark th->last_status. [ruby-dev:27179]akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-14* dir.c: changed `foo (*bar)_((boo))' to `foo (*bar)(boo)`.ocean
* enumerator.c, eval.c, gc.c, intern.h, io.c, process.c, ruby.c, ruby.h, signal.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-14* bignum.c: changed `foo _((boo))' to `foo(boo)`. [ruby-dev:27056]ocean
* defines.h, dir.c, dln.h, enumerator.c, env.h, error.c, eval.c, file.c, gc.c, hash.c, inits.c, intern.h, io.c, lex.c, marshal.c, missing.h, node.h, numeric.c, pack.c, process.c, re.h, ruby.c, ruby.h, rubyio.h, rubysig.h, signal.c, sprintf.c, st.h, string.c, struct.c, time.c, util.c, util.h, variable.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-13* eval.c (BEGIN_CALLARGS): pop halfly pushed status.nobu
fixed: [ruby-dev:26881] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-12* eval.c (proc_save_safe_level): no need to restrict safe levelmatz
memoize in $SAFE>=3. [ruby-dev:27050] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-12* dln.c: avoid warning of const to non-const convertion.ocean
[ruby-dev:27041] * eval.c, io.c, ruby.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-12* array.c: moved to ANSI function style from K&R function style.ocean
(used protoize on windows, so still K&R remains on #ifdef part of other platforms. And `foo _((boo))' stuff is still there) [ruby-dev:26975] * bignum.c, class.c, compar.c, dir.c, dln.c, dmyext.c, enum.c, enumerator.c, error.c, eval.c, file.c, gc.c, hash.c, inits.c, io.c, main.c, marshal.c, math.c, numeric.c, object.c, pack.c, prec.c, process.c, random.c, range.c, re.c, regcomp.c, regenc.c, regerror.c, regexec.c, regparse.c, regparse.h, ruby.c, signal.c, sprintf.c, st.c, string.c, struct.c, time.c, util.h, variable.c, version.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-10* array.c: protoize.matz
* eval.c (splat_value): simpler and consistent array conversion for argument splat. [yarv-dev:599] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-07* eval.c (rb_thread_switch): convert all exceptions tonobu
SystemExit. fixed: [ruby-core:05724] * eval.c (rb_thread_terminated): show backtrace before propagate exceptions to main thread. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-05* lib/observer.rb: a patch from nornagon <nornagon@gmail.com>matz
merged to allow arbitrary names for update methods. [ruby-core:05416] * eval.c (rb_f_fcall): new method to avoid inefficiency of obj.instance_eval{send(...)} tricks. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-01* eval.c (rb_call0): wrong condition for $SAFE restoration.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-30* eval.c (rb_rescue2): intialization miss. fixed: [ruby-dev:26917]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-30* eval.c (rb_f_send): do not call private methods if the receivermatz
is specified. [ruby-talk:153672] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-17* eval.c (terminate_process): take String message.nobu
* eval.c (rb_thread_switch): propagate the exception caused thread termination directly. fixed: [ruby-core:05552] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-16* eval.c (rb_add_method): preserve safe level in the environmentmatz
where a method is defined . * eval.c (rb_call0): restore preserved safe level in the method execution. * parse.y (lambda): need separate block variable stack manipulation and lpar_beg maintenance. based on a patch found in [ruby-core:05551] from Mauricio Fernandez <mfp@acm.org>. * parse.y (parser_yylex): adjust lpar_beg after tLAMBEG and kDO_LAMBDA. [ruby-core:05551] * parse.y (yycompile): remove unreachable code. [yarv-dev:570] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-16* eval.c (rb_mod_autoload_p, rb_f_autoload_p): added rdoc.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-14* eval.c (rb_rescue2): reduce PUSH_TAG() as well as NODE_RESCUE.nobu
[ruby-dev:26800] * range.c (range_check, range_init): reduce uselse exceptions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-13* eval.c (rb_block_pass): distinguish current block from others.nobu
fixed: [ruby-dev:26274] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-09* eval.c (formal_assign): let default values overridenobu
arguments to zsuper. fixed: [ruby-dev:26743] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-08* parse.y (f_block_arg), eval.c (rb_yield_0): deal with dynamicnobu
variable lambda arguments. [ruby-core:05540] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e