summaryrefslogtreecommitdiff
path: root/eval.c
AgeCommit message (Collapse)Author
2002-11-14* configure.in (LIBRUBY_A): append -static. [ruby-dev:18689]nobu
* configure.in (LIBRUBYARG_STATIC, LIBRUBYARG_SHARED): linker argument to link static/shared library respectively. * Makefile.in (LIBRUBYARG_STATIC, LIBRUBYARG_SHARED): added. * bcc32/Makefile.sub, win32/Makefile.sub: ditto. * instruby.rb (LIBRUBY_A): install to libdir. * lib/mkmf.rb (link_command): link static library of ruby, or try_run fails unless LIBRUBY_SO is installed. [ruby-dev:18646] * eval.c (call_trace_func): toplevel caller was missing. [ruby-dev:18754] * eval.c (proc_to_s): adjust created line number. * parse.y (primary, do_block, brace_block): adjust line number of block to beginning line, instead of the first statement inside the block. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-14* math.c (math_acos): check errno after operation. ditto formatz
asin, acosh, atanh, log, log10 and sqrt. * eval.c (rb_add_method): initialize should always be private. * parse.y (expr): add rescue modifier rule. * parse.y (command_call): return, break and next with argument is now part of this rule. * parse.y (yylex): "a" in "a /5" should be considered as a local variable. [experimental] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-09* eval.c: remove ENABLE_TRACE/DISABLE_TRACE to trace child nodes of c-call.nahi
[ruby-dev:18699]; nahi commits this as proxy for nobu. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-07* class.c (rb_define_method): do not set NOEX_CFUNC if klass ismatz
really a module, whose methods must be safe for reciever's type. * eval.c (rb_eval): nosuper should not be inherited unless the overwritten method is an undef placeholder. * parse.y (primary): allow 'when'-less case statement; persuaded by Sean Chittenden. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3032 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-07* eval.c (rb_yield_0): should enable trace for non-cfunc nodes.nobu
[ruby-dev:18645] * eval.c (blk_orphan): a block created in a different thread is orphan. [ruby-dev:17471] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-03* object.c (Init_Object): added Object#object_id, new name formatz
Object#id. [new] * object.c (rb_obj_id_obsolete): give warning for Object#id. * numeric.c (fix_intern): added Fixnum#to_sym. [new] * object.c (sym_to_sym): rename from Symbol#intern * enum.c (enum_zip): added Enumerable#zip. [new] * array.c (rb_ary_zip): added Array#zip. * error.c (init_syserr): remove sys_nerr dependency. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-30* eval.c (rb_mod_public_method_defined, etc.): new methods:matz
public_method_defined?, private_method_defined?, protected_method_defined? * object.c (rb_obj_public_methods): new method Object#public_methods. * class.c (ins_methods_i): Object#methods should list both public and protected methods. * class.c (rb_class_public_instance_methods): new method Module#public_instance_methods. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-29* eval.c, file.c, gc.c, io.c, object.c, ruby.c, ruby.h, struct.c,knu
ext/socket/socket.c: differentiate long and int; use proper printf type specifiers and do casts where appropriate. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-29 * eval.c (error_print, rb_longjmp, rb_thread_schedule): flushnobu
error message. [ruby-dev:18582] * eval.c (ruby_cleanup): added. just clean up without exit. [ruby-dev:18582] * eval.c (ruby_exec): added. execute main evaluation tree without exit. [ruby-dev:18582] * intern.h: prototypes; ruby_cleanup, ruby_exec git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-25* eval.c, gc.c: adopt a common set of alloca() #ifdef's. Thisknu
fixes the build with Intel C Compiler for Linux. * eval.c (rb_f_require): declare old_func with a real type, not just type modifiers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-23* eval.c (rb_eval): added NODE_DSYM, symbol literal withnobu
interpolation. * node.h: ditto. * intern.h: prototypes; rb_is_junk_id, rb_str_dump, rb_str_intern * object.c (sym_inspect): escape and quote for non-alphanumeric symbols. * parse.y (dsym, tokadd_string, yylex): extended symbol literals. * parse.y (rb_is_junk_id): added. * string.c (rb_str_dump, rb_str_intern) : make extern. * lib/mkmf.rb (create_makefile): deffile should be removed by distclean, not clean. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-17* hash.c, eval.c: Use (*_NSGetEnviron()) instead of environ onknu
Darwin for namespace cleanness. [ruby-core:00537] * dln.c (dln_load): Fix Darwin support that has been disabled and switch to using it on Darwin instead of the system dlopen(). [ruby-core:00541] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-05* eval.c (rb_load): should not pass block to the loaded file.aamine
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-04* eval.c (rb_thread_interrupt, rb_thread_signal_raise): no need tonobu
save dead thread context. (same as [ruby-dev:18322]) (ruby-bugs-ja:PR#349) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2935 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-03* bcc32/mkexports.rb: to work on cygwin via telnet.nobu
[ruby-win32:358] * ext/tcltklib/tcltklib.c (ip_invoke): requires command name argument. [ruby-dev:18438] * eval.c (ruby_init, ruby_options): Init_stack() with local location. (ruby-bugs-ja:PR#277) * eval.c (rb_call0): disable trace call. [ruby-dev:18074] * eval.c (eval, rb_load): enable trace call. [ruby-dev:18074] * eval.c (rb_f_require): set source file name for extension libraries. [ruby-dev:18445] * ruby.c (translate_char): translate a character in a string; DOSISH only. [ruby-dev:18274] * ruby.c (ruby_init_loadpath): added argv[0] handling under Human68K. [ruby-dev:18274] * ruby.c (proc_options): translate directory separator in $0 to '/'. [ruby-dev:18274] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-27* eval.c (rb_thread_deadlock, rb_thread_schedule, rb_thread_join): more ↵nobu
verbose message at deadlock. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-27* eval.c (rb_eval): Class#inherited should be called after thematz
execution of the class body. * parse.y (primary): remove "return outside of method" check at compile time. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-26* regex.c (re_match): p1 may exceed pend limit.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-25* io.c (appendline): forget to terminate with nul.matz
* eval.c (ruby_run): should set toplevel visibility again here. * eval.c (rb_eval): should not rely on ruby_class == rb_cObject check. Besides allow implicit publicity for attribute set methods. * parse.y (primary): need not to check class_nest, just set whether method is an attrset or not. * string.c (rb_str_each_line): p might be at the top of the string. * class.c (rb_make_metaclass): class of metaclass should be metaclass of superclass, unless class itself is a metaclass; class of metaclass of metaclass should point back to self. eh, confusing, isn't it. * class.c (rb_singleton_class): check if its class is singleton AND attached to self. * eval.c (rb_eval): should define class/module under ruby_cbase. * eval.c (rb_eval): should set class/module path based on ruby_cbase, not ruby_class. * eval.c (module_setup): use ruby_cbase instead of ruby_class. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-23* eval.c (rb_call0): must not clear ruby_current_node, ornobu
backtrace cannot be genetated. * intern.h (ruby_yyparse): rather than yyparse(). * parse.y (yylex): nextc() returns -1 at end of input, not 0. * parse.y (newline_node): reduce deplicated newline node. * parse.y (literal_concat): get rid of warning. * parse.y (new_evstr): fixed junk code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-22* eval.c (call_trace_func): should not call trace function whilenobu
compilation. * eval.c (rb_call0): also inside c-func. * parse.y (yycompile): ditto. * ruby.c (require_libraries): preserve source file/line for each require. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-21* eval.c (rb_thread_raise): no need to save dead thread context.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-17move struct timeval to missing.hmichal
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-17* eval.c (rb_thread_die): put thread dead state.nobu
* eval.c (rb_thread_atfork): free stack buffer at fork too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-17* eval.c (rb_mod_nesting): load wrapping module should appear inmatz
Module#nesting list. (ruby-bugs-ja:PR#328) * eval.c (rb_thread_remove): free stack buffer on remove. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-13* eval.c (rb_eval): avoid uninitialized global/class variablenobu
warnings at `||='. [ruby-dev:18278] * parse.y (stmt, arg): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-11* eval.c (rb_trap_eval): preserve thread status and so on.nobu
[ruby-talk:40337], [ruby-core:00019] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-11* eval.c (proc_to_s): refined format. [ruby-dev:18215]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-10* eval.c (rb_mod_define_method): initialize orig_func too.nobu
(ruby-bugs-ja:PR#330) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-05* eval.c (rb_eval): overriding false constant with class/modulenobu
definition should be error. (PR#327) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-29* array.c (rb_ary_become): should not free ptr if it's shared.matz
* eval.c (rb_alias): prohibit making an alias named "allocate" if klass is a metaclass. * string.c (rb_string_value_ptr): StringValuePtr() should never return NULL pointer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-28Int vs Long cleanup #3 (ruby-core:352)michal
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-27* file.c (rb_find_file): $LOAD_PATH must not be empty.matz
* file.c (rb_find_file_ext): ditto. * range.c (range_eq): class check should be based on range.class, instead of Range to work with Range.dup. * range.c (range_eql): ditto. * class.c (rb_mod_dup): need to preserve metaclass and flags. * object.c (rb_cstr_to_dbl): had a buffer overrun. * marshal.c (w_class): integrate singleton check into a funciton to follow DRY principle. * marshal.c (w_uclass): should check singleton method. * object.c (rb_obj_dup): dmark and dfree functions must be match for T_DATA type. * object.c (rb_obj_dup): class of the duped object must be match to the class of the original. * re.c (rb_reg_quote): do not escape \t, \f, \r, \n, for they are not regular expression metacharacters. * time.c (time_s_alloc): use time_free instead of free (null check, also serves for type mark). * time.c (time_s_at): check dfree function too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-24* eval.c (call_trace_func): restore source file/line, as tracenobu
function installed in required library with -r option can be called while parsing. (ruby-bugs:PR#372) * eval.c (module_setup): unused variable. [ruby-core:00358] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-23* eval.c (method_call): check receiver is defined.nobu
* eval.c (umethod_call): removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-21*.c: Int vs Long cleanupmichal
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-21* eval.c (rb_thread_cleanup): should not modify the globalmatz
variable curr_thread. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-19particular symbol for win32_exception_list.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-19* eval.c (win32_get_exception_list, win32_set_exception_list): Cygwin fix.eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-19* eval.c (rb_thread_save_context, rb_thread_restore_context):nobu
save/restore SEH chain on MS-Windows at thread switch. [ruby-win32:273] * eval.c (win32_get_exception_frame, win32_set_exception_frame): added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-15* eval.c (compile_error): must not clear ruby_sourcefile here.nobu
(ruby-bugs:PR#364). * eval.c (rb_longjmp): set ruby_sourcefile before making backtrace. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-15* eval.c (ruby_current_node) : added to set sourceline on demand.nobu
* eval.c (error_pos, error_print, rb_longjmp, assign): set source file/line. * eval.c (rb_eval): store current node instead of file/line, and preserve it at return. * eval.c (module_setup): ditto. * eval.c (struct thread): store node instead of file/line. * eval.c (rb_thread_raise): ditto. * intern.h (ruby_current_node): added. * intern.h (ruby_set_current_source): added. * parse.y (stmt, arg): not fix position of assignment. * parse.y (node_assign): ditto. * parse.y (yycompile): clear current node. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-12* bignum.c (rb_big_cmp): use dbl2big() for Floats, instead ofmatz
big2dbl(). * bignum.c (Init_Bignum): rb_big_zero_p() removed. There may be Bignum zero. * eval.c (rb_call0): new argument added for original method name. preserve original method name in frame->orig_func. * eval.c (is_defined): use frame->orig_func, not last_func. * eval.c (rb_eval): ditto. * eval.c (method_call): supply data->oid also to rb_call0(). * object.c (rb_class_allocate_instance): call rb_obj_alloc() when called from alias, thus invoke original "allocate". * eval.c (remove_method): removing allocate from classes should cause NameError. * hash.c (rb_hash_equal): should check default values. * ext/socket/socket.c (s_recvfrom): update RSTRING len. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-11* eval.c (rb_eval): set line number from all nodes.nobu
* eval.c (proc_to_s): show source file/line if available. * marshal.c (r_object): register TYPE_BIGNUM regardless real type. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-03* eval.c (rb_eval): set constant in cbase scope.nobu
* eval.c (assign): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-07-31* eval.c (rb_undef): undef should be done for klass, not ruby_class.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-07-30* eval.c (rb_thread_join_m): add parameter type declaration.aamine
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-07-29* eval.c (localjump_error): add parameter type declaration.aamine
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2665 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-07-26* eval.c (rb_eval): no need to convert to string twice.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-07-26* random.c: replace with Mersenne Twister RNG.matz
* eval.c (jump_tag_but_local_jump): preserve retval in LocalJumpError exceptions. * parse.y (command): no more check for "super outside of method". * eval.c (rb_mod_define_method): should set last_class and last_func in the block->frame. * eval.c (error_handle): should handle TAG_THROW as well. * parse.y (yylex): new decimal notation '0d4567'. * parse.y (yylex): new octal notation '0o777'. * parse.y (string_content): every string_content node should return string only. use NODE_EVSTR to coercing. * eval.c (rb_eval): NODE_EVSTR support. * re.c (rb_reg_quote): avoid unnecessary string allocation. * string.c (get_pat): quote metachracters before compiling a string into a regex. * string.c (rb_str_split_m): special treatment of strings of size 1, but AWK emulation. now uses get_pat(). * string.c (rb_str_match_m): quote metacharacters. * string.c (rb_str_match2): ditto. * ext/socket/socket.c (sock_addrinfo): make all 3 versions of getaddrinfo happy. [ruby-core:00184] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e