aboutsummaryrefslogtreecommitdiffstats
path: root/eval.c
Commit message (Collapse)AuthorAgeFilesLines
...
* * enum.c (enum_sort_by): do not use qsort directly. usematz2004-09-211-7/+28
| | | | | | | | | | | | | | | | | | | | rb_ary_sort_bang() instead. [ruby-dev:24291] * enum.c (enum_sort_by): pedantic type check added. [ruby-dev:24291] * hash.c (rb_hash_foreach_iter): check iter_lev after each iteration. [ruby-dev:24289] * array.c (rb_ary_and): element size might change during comparison. [ruby-dev:24290] * array.c (rb_ary_or): ditto. [ruby-dev:24292] * array.c (rb_ary_equal): wrong fix. [ruby-dev:24286] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (blk_copy_prev): need frame_dup(). [ruby-dev:24103]eban2004-09-131-17/+18
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (cvar_cbase): singletons should refer outer cvar scope.matz2004-09-061-2/+2
| | | | | | | | | | [ruby-dev:24223] * eval.c (rb_load): should preserve previous ruby_wrapper value. [ruby-dev:24226] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (cvar_cbase): class variables cause SEGV inmatz2004-09-031-0/+3
| | | | | | | instance_eval() for fixnums and symbols. [ruby-dev:24213] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * struct.c (make_struct): remove redefining constant whenmatz2004-09-031-32/+2
| | | | | | | conflict. [ruby-dev:24210] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (rb_big_and): protect parameters from GC.matz2004-08-281-2/+3
| | | | | | | | | | | | [ruby-talk:110664] * error.c (exc_equal): exceptions are equal if they share same class, message and backtrace. [ruby-talk:110354] * error.c (name_err_mesg_equal): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Must learn how to transpose words in Emacs. Sorry...dave2004-08-251-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Minor fix to error messagedave2004-08-251-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_longjmp): Exception#to_str is no longer defined.nobu2004-08-251-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * dir.c (free_dir): fix memory leak. reported by yamamotomatz2004-08-191-1/+25
| | | | | | | | | | | | | | madoka. * eval.c (bind_eval): new method. [RCR 251] * string.c (rb_str_clear): new method. [ruby-dev:24104] * io.c (rb_io_reopen): should clear allocated OpenFile. pointed out by Guy Decoux. [ruby-core:03288] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_obj_instance_eval): evaluates under special singletonnobu2004-08-181-8/+1
| | | | | | | classes as for special constants. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (blk_free): fixed serious memory leak. [ruby-dev:24013]matz2004-08-021-1/+14
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (is_defined): stupid mistakes fixed. [ruby-dev:24006]matz2004-07-311-2/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (is_defined): avoid unnecessary method invocations.matz2004-07-311-9/+11
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (is_defined): call is_defined() before invokingmatz2004-07-301-5/+10
| | | | | | | rb_eval(). [ruby-talk:107867] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_call0): should call rb_call_super() directly formatz2004-07-281-2/+2
| | | | | | | visibility overriding. [ruby-dev:23989] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * env.h: remove argv from ruby_frame.matz2004-07-281-80/+21
| | | | | | | | | | | | | | | | | | * eval.c (rb_eval): no more copy on write. * eval.c (assign): ditto. * eval.c (rb_call0): can receive *rest by specifying negative argc. (-1 means 0 arg and *rest, -2 means 1 arg and *rest...) * eval.c (rb_call0): properly set frame's argc counter. * gc.c (rb_gc_mark_frame): need not to mark frame's argv * gc.c (run_final): wrong order of data. [ruby-dev:23948] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_call0): update ruby_frame->argv with the defaultmatz2004-07-271-1/+1
| | | | | | | value used for the optional arguments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_eval): copy on write for argument local variablematz2004-07-271-3/+3
| | | | | | | | | | | | | | | assignment. * eval.c (assign): ditto. * eval.c (rb_call0): update ruby_frame->argv with the default value used for the optional arguments. * object.c (Init_Object): "===" calls rb_obj_equal() directly. [ruby-list:39937] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (define_final): should not disclose NODE* to Ruby world.matz2004-07-231-0/+3
| | | | | | | [ruby-dev:23957] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (THREAD_ALLOC): th->thread should be initialized to NULL.matz2004-07-171-0/+1
| | | | | | | | | | [ruby-talk:106657] The solution was found by Guy Decoux. * file.c (rb_stat_dev_major): new methods File::Stat#dev_major and #dev_minor. [ruby-core:03195] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_thread_raise): accept third argument as well asnobu2004-07-091-11/+26
| | | | | | | | Kernel#raise, and evaluate the arguments to create an exception in the caller's context. [ruby-talk:105507] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_thread_yield, rb_f_catch): 4th argument to rb_yield_0()nobu2004-07-051-2/+2
| | | | | | | is a set of bit flags. [ruby-dev:23859] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_eval_cmd, rb_thread_trap_eval): restore safe level.nobu2004-06-291-13/+22
| | | | | | | | | | | * gc.c (define_final, run_final): preserve and restore safe level for finalizers. [ruby-core:03058] * signal.c (signal_exec, rb_trap_exit, trap): preserve and restore safe level for signal handlers. [ruby-dev:23829] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (return_jump, break_jump): raise unexpceted local jumpnobu2004-06-221-2/+2
| | | | | | | exception directly. [ruby-dev:23740] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (proc_set_safe_level, proc_invoke, rb_mod_define_method): notnobu2004-06-191-2/+7
| | | | | | | set $SAFE for methods defined from Proc. [ruby-dev:23697] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (method_call): allow changing $SAFE. [ruby-dev:23713]nobu2004-06-191-4/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (eval): adjust indent.nobu2004-06-181-5/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (proc_save_safe_level, rb_set_safe_level, safe_setter): limitnobu2004-06-181-1/+8
| | | | | | | safe level. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_mod_freeze): prepare string representation beforematz2004-06-161-2/+0
| | | | | | | freezing. [ruby-talk:103646] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_eval): bad influence on frame node.nobu2004-05-281-4/+1
| | | | | | | * eval.c (eval): reverted wrongly removed condition. [ruby-dev:23638] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_eval, eval): make line number consistent on eval withnobu2004-05-261-3/+4
| | | | | | | Proc. [ruby-talk:101253] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_yield_0, proc_invoke, proc_arity): allow passing a blocknobu2004-05-251-20/+43
| | | | | | | | | to a Proc. [ruby-dev:23533] * parse.y (block_par, block_var): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_method_node): search cache entry first.matz2004-05-181-0/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (eval): forgot to restore $SAFE value before evaluatingmatz2004-05-141-0/+1
| | | | | | | compiled node. [ruby-core:02872] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * range.c (range_each_func): terminates loop if generating valuematz2004-05-141-29/+12
| | | | | | | | | | | | | | | | is same to @end. [ruby-talk:100269] * string.c (rb_str_new4): should not reuse frozen shared string if the original is not an instance of String. [ruby-talk:100193] * time.c (time_mdump): preserve GMT bit in the marshal data. [ruby-talk:100213] * eval.c (is_defined): do not protect exception during receiver evaluation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (eval): warning during eval should not cause deadlock.matz2004-05-101-3/+6
| | | | | | | | | | [ruby-talk:98651] * eval.c (rb_eval): raise TypeError exception for superclass mismatch. [ruby-dev:39567] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (string_content): turn off NODE_NEWLINE flag to avoidmatz2004-05-071-5/+24
| | | | | | | | | | | | | | | | | | | | | | | unnecessary line trace for inlined expression. (ruby-bugs PR#1320) * numeric.c (flo_to_s): tweak output string based to preserve decimal point and to remove trailing zeros. [ruby-talk:97891] * string.c (rb_str_index_m): use unsigned comparison for T_FIXNUM search. [ruby-talk:97342] * hash.c (rb_hash_equal): returns true if two hashes have same set of key-value set. [ruby-talk:97559] * hash.c (rb_hash_eql): returns true if two hashes are equal and have same default values. * string.c (rb_str_equal): always returns true or false, never returns nil. [ruby-dev:23404] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_mod_define_method): allow binding methods to modules.nobu2004-04-211-1/+2
| | | | | | | [ruby-dev:23410] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c, enum.c, eval.c, file.c, io.c, numeric.c, object.c, prec.c,nobu2004-04-141-1/+1
| | | | | | | process.c, re.c, string.c: typos in RDoc comments. [ruby-core:02783] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * pack.c (pack_pack): use NUM2INT() instead of num2i32().matz2004-04-071-12/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (rb_get_path): get path string via "to_path" method ifmatz2004-04-071-6/+3
| | | | | | | | | | | | path object is not a string. [Ruby2] * gc.c (rb_gc_call_finalizer_at_exit): do not free threads in the exit finalizers. * io.c (rb_io_reopen): should use rb_io_check_io(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * error.c (Init_Exception): remove Exception#to_str. [Ruby2]matz2004-04-051-1/+1
| | | | | | | | | | | * eval.c (error_print): should no call "to_str" anymore use "message" method instead. * io.c (rb_f_open): Kernel#open() calls "to_open" if the first argument responds to it. [Ruby2] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (top_include): include in the wrapped load is done formatz2004-04-021-5/+3
| | | | | | | | | | | | the wrapper, not for a singleton class for wrapped main. [ruby-dev:23305] * bignum.c (rb_big_eq): use temporary double variable to save the result (internal float register may be bigger than 64 bits, for example, 80 bits on x86). [ruby-dev:23311] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (block_pass): should increment unique identifier of thematz2004-04-021-0/+1
| | | | | | | block. [ruby-talk:96363] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (Init_load): make $LOADED_FEATURES built-in. [ruby-dev:23299]aamine2004-04-021-0/+1
| | | | | | | | * ruby.c (ruby_prog_init): make $PROGRAM_NAME built-in. * lib/English.rb: remove $LOADED_FEATURES and $PROGRAM_NAME. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_eval): fix SEGV at retry in iterator's receiver.nobu2004-03-301-2/+1
| | | | | | | [ruby-dev:23227] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * exception message clean-up by Ian Macdonald <ian@caliban.org>.matz2004-03-291-10/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * object.c (rb_mod_cvar_get): new method Module#class_variable_get.matz2004-03-231-1/+0
| | | | | | | | | | * object.c (rb_mod_cvar_set): ditto (Module#class_variable_set). * eval.c (rb_thread_atfork): 1.9 warns no more for thread termination. [ruby-dev:23212] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6005 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_require_safe): preserve old ruby_errinfo.matz2004-03-201-4/+6
| | | | | | | | | | | | | [ruby-talk:95409] * eval.c (rb_f_raise): should not clear backtrace information if exception object already have one. * parse.y (assoc_list): allow {sym: val} style Hash. [Ruby2] this change is done by Nobuyoshi Nakada <nobu@ruby-lang.org>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e