summaryrefslogtreecommitdiff
path: root/eval.c
AgeCommit message (Collapse)Author
2001-07-27* eval.c (rb_eval): add CHECK_INTS before next, redo, retry tomatz
avoid potential uninterruptable infinite loop. * file.c (rb_file_s_expand_path): should not expand "." and ".." not following dirsep. * eval.c (rb_provide_feature): should not tweak extension used for loading. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-24* eval.c (rb_provide_feature): should not tweak extension used formatz
loading. * eval.c (rb_f_require): should not include path in $" value * file.c (rb_find_file): should return 0 explicitly on failure. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-19too much backport from 1.7 canceled.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-19back port from 1.7matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-16* eval.c (proc_invoke): should preserve iter status for embeddedmatz
frame in the block. * file.c (rb_file_s_expand_path): may overrun buffer on stack. * regex.c (re_search): should consider reverse search. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-13* eval.c: wrapper modifies updated to 1.7 changes.matz
* object.c (rb_obj_dup): should free generic_ivar if original owns them. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-06* remove StringValue (1.7 feature) from eval.cmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-06* eval.c (rb_f_require): move rb_file_s_expand_path frommatz
rb_find_file_noext(). * file.c (rb_find_file_noext): move rb_file_s_expand_path to rb_f_require(). * string.c (rb_str_each_line): should propagate taint mark. * ext/nkf/nkf.c (rb_nkf_kconv): ditto. * ruby.c (load_file): local variables 'c' remain uninitialized on xflag. * regex.c (re_match): prefetched escaped character too early. * eval.c (rb_call0): add argument check for attr_readers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-02* eval.c (rb_eval_string_wrap): extend new ruby_top_self, notmatz
original self. * eval.c (rb_eval_cmd): respect ruby_wrapper if set. * eval.c (eval): do not update ruby_class unless scope is not provided. * eval.c (eval): preserve wrapper information. * eval.c (proc_invoke): ditto. * eval.c (block_pass): ditto. * parse.y (void_expr): too much warnings for void context (e.g. foo[1] that can be mere Proc call). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-29* lex.c (rb_reserved_word): lex_state after tRESCUE should bematz
EXPR_MID. * gc.c (add_heap): allocation size of the heap unit is doubled for each allocation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-19* eval.c (rb_f_require): searches ".rb" and ".so" at the samematz
time. previous behavior (search ".rb", then ".so") has a security risk (ruby-bugs#PR140). * regex.c (re_compile_pattern): avoid pushing unnecessary option_set. * eval.c (rb_load): tainted string is OK if wrapped *and* $SAFE >= 4. * eval.c (rb_thread_start_0): should not nail down higher blocks before preserving original context (i.e. should not alter original context). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-11* hash.c (ruby_setenv): readline library leaves their environmentmatz
strings uncopied. "free" check revised. * st.c (numhash): should shuffle bits by dividing by prime number. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-06* eval.c (rb_load): should check if tainted even when wrap ismatz
specified. * regex.c (re_compile_pattern): too much optimization for the cases like /(.|a)b/. * variable.c (fc_i): removed vast string allocation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-05* eval.c (rb_add_method): should not call rb_secure(), formatz
last_func may not be set. * io.c (rb_io_ctl): ioctl should accept any integer within C long range. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-05-29* regex.c (re_compile_pattern): no back reference to amatz
subexpression if inside of it. * eval.c (rb_yield_0): preserve and restore ruby_cref as well. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-05-25* string.c (rb_str_replace): add taint status infectionmatz
(OBJ_INFECT()). * string.c (rb_str_crypt): ditto. * string.c (rb_str_ljust): ditto. * string.c (rb_str_rjust): ditto. * string.c (rb_str_center): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-05-24* eval.c (rb_yield_0): need argument adjustment for C definedmatz
blocks too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-05-17* eval.c (rb_call0): address of local_vars might change during eval.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-05-15* array.c (rb_ary_and): should not push frozen key string.matz
* array.c (rb_ary_or): ditto. * eval.c (rb_thread_schedule): should save context before raising deadlock, saved context for current thread might be obsolete. * time.c (make_time_t): non DST timezone shift supported (hopefully). * signal.c: SIGINFO added. * eval.c (rb_ensure): should not SEGV when prot_tag is NULL. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-05-08* eval.c (is_defined): core dumped during instance_eval formatz
special constants. * eval.c (rb_eval): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-05-07* parse.y (arg): "||=" should not warn for uninitialized instancematz
variables. * eval.c (rb_eval): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-05-07* eval.c (eval): preserve and restore ruby_cref as well.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-05-07checkin leftoversmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-05-02* eval.c (block_pass): should not downgrade safe level.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-05-01* eval.c (rb_eval): should preserve value of ruby_errinfo.matz
* eval.c (rb_thread_schedule): inifinite sleep should not cause dead lock. * array.c (rb_ary_flatten_bang): proper recursive detection. * eval.c (yield_under): need not to prohibit at safe leve 4. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-04-24* ruby.c (set_arg0): wrong predicate when new $0 value is biggermatz
than original space. * gc.c (id2ref): should use NUM2ULONG() * object.c (rb_mod_const_get): check whether name is a class variable name. * object.c (rb_mod_const_set): ditto. * object.c (rb_mod_const_defined): ditto. * marshal.c (w_float): precision changed to "%.16g" * eval.c (rb_call0): wrong retry behavior. * numeric.c (fix_aref): a bug on long>int architecture. * eval.c (rb_eval_string_wrap): should restore ruby_wrapper. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-04-19m68m frame_pointer patchmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-04-17preview2matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-04-17 * eval.c (safe_getter): should use INT2NUM().matz
* bignum.c (rb_big2long): 2**31 cannot fit in 31 bit long. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-04-16eval.c: malformed patch applied.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-04-16* regex.c (calculate_must_string): wrong length calculation.matz
* eval.c (rb_thread_start_0): fixed memory leak. * parse.y (none): should clear cmdarg_stack too. * io.c (rb_fopen): use setvbuf() to avoid recursive malloc() on some platforms. * file.c (rb_stat_dev): device functions should honor stat field types (except long long such as dev_t). * eval.c (rb_mod_nesting): should not push nil for nesting array. * eval.c (rb_mod_s_constants): should not search array by rb_mod_const_at() for nil (happens for singleton class). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1320 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-04-10* io.c (opt_i_set): should strdup() inplace_edit string.matz
* eval.c (exec_under): need to push cref too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-04-09* file.c (Init_File): should redifine "new" class method.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-04-06* variable.c (rb_const_get): no recursion to show full class pathmatz
for modules. * eval.c (rb_set_safe_level): should set safe level in curr_thread as well. * eval.c (safe_setter): ditto. * object.c (rb_obj_is_instance_of): nil belongs to false, not true. * time.c (make_time_t): proper (I hope) daylight saving time handling for both US and Europe. I HATE SUMMER TIME! * eval.c (rb_thread_wait_for): non blocked signal interrupt should stop the interval. * class.c (rb_mod_clone): should copy method bodies too. * bignum.c (bigdivrem): should trim trailing zero bdigits of remainder, even if dd == 0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-04-03* time.c (make_time_t): remove HAVE_TM_ZONE code since itmatz
sometimes reports wrong time. * time.c (make_time_t): remove unnecessary range check for platforms where negative time_t is available. * numeric.c (flodivmod): a bug in no fmod case. * process.c (pst_wifsignaled): should apply WIFSIGNALED for status (int), not st (VALUE). * class.c (rb_include_module): module inclusion should be check taints. * class.c (rb_include_module): freeze check at first. * eval.c (rb_attr): sprintf() and rb_intern() moved into conditional body. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-03-28* object.c (rb_str2cstr): warn if string contains \0 and lengthmatz
value is ignored. * class.c (rb_singleton_class_clone): should copy class constant table as well. * class.c (rb_include_module): sometimes cache was mistakenly left uncleared - based on the patch by K.Kosako. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-03-27* eval.c (rb_mod_define_method): should have clear method cache.matz
* eval.c (rb_mod_define_method): should have raised exception for type error. * ruby.h: changed "extern INLINE" to "static inline". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-03-26* eval.c: remove TMP_PROTECT_END to prevent C_ALLOCA crash.matz
* eval.c (ev_const_defined): should ignore toplevel cbase (Object). * eval.c (ev_const_get): ditto. * ext/curses/curses.c: curses on Mac OS X public beta does not have _maxx etc. * marshal.c (w_object): should truncate trailing zero short for bignums. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-03-19* eval.c (ev_const_defined): need not to check if cbase->nd_classmatz
is rb_cObject. * eval.c (ev_const_get): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-03-19* eval.c (THREAD_ALLOC): flags should be initialized.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-03-16remove duplicated initialize in PUSH_TAG.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-03-14* eval.c (rb_thread_schedule): raise FATAL just once tomatz
THREAD_TO_KILL. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-03-14* eval.c (rb_yield_0): 0 (= Qfalse) is a valid value, so thatmatz
default self should be checked by klass == 0. * bignum.c (rb_cstr2inum): should disallow '++1', '+-1', etc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-03-13* io.c (argf_seek): wrong calling sequence of rb_io_seek().matz
* parse.y (stmt): while/until modifier must work for empty body. * ruby.c (ruby_set_argv): clear ARGV contents before adding args. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-03-06* parse.y (primary): rescue and ensure clauses should be allowedmatz
to appear in singleton method body. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-02-28* string.c (rb_str_delete_bang): delete! should take at least 1matz
argument. * eval.c (ev_const_defined): check Object's constant if no current class is available (e.g. defining singleton class for Fixnums). * eval.c (rb_yield_0): should check based on rb_block_given_p() and rb_f_block_given_p(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-02-27* eval.c (ev_const_get): retrieve Object's constant if no currentmatz
class is available (e.g. defining singleton class for Fixnums). * eval.c (proc_call): ignore block to `call' always, despite of being orphan or not. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-02-26* eval.c (proc_call): should not modify ruby_block->frame.itermatz
based on ruby_frame->iter altered by PUSH_ITER(). * eval.c (rb_thread_fd_close): should save current context before raising exception. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-02-19commit miss; sorrymatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-02-11* eval.c (stack_length): use __builtin_frame_address() only ifeban
GCC and i386 CPU. * gc.c (rb_gc, Init_stack): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e