summaryrefslogtreecommitdiff
path: root/eval.c
AgeCommit message (Collapse)Author
2002-02-27* eval.c (rb_f_missing): NoMethod error messages for true, false,matz
nil must respond visibility like for other objects. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-21* eval.c: typo fixed.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-20* hash.c (rb_any_cmp): should handle Qundef in keys.matz
* eval.c (remove_method): should not remove a empty method to implement "undef". * eval.c (rb_eval): should allow singleton class def for true/false/nil. * parse.y (str_extend): backslash escape was done wrong. * class.c (rb_include_module): should preserve ancestor order in the included class/module. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-19* variable.c (rb_cvar_set): define new class variable if it's notmatz
defined yet. * eval.c (rb_eval_string_wrap): should hide the toplevel local variable bindings by PUSH_SCOPE(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-18* eval.c (block_pass): "&nil" should clear block given.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-14eval.c: remove duplicate lines.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-13* parse.y (assignable): should emit CVASGN within the methodmatz
body. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-09* eval.c (rb_eval): singleton chech should be moved from yycompilematz
to here. * eval.c (is_defined): check should be added here too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-08* parse.y (yycompile): should inherit "in_single" if eval happenedmatz
in a singleton method. * eval.c (rb_eval): class variables from singleton methods defined within singleton class statement should work like ones defined by sington def statements. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-01* re.c (rb_reg_search): should set regs.allocated.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-01-28* eval.c (umethod_bind): typo fix(rklass -> klass).eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-01-28* eval.c (is_defined): defined?(Foo::Baz) should check constantsmatz
only, no methods. * eval.c (is_defined): should not dump core on defined?(a::b) where a is not a class nor a module. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-01-25* class.c (rb_include_module): detect cyclic module inclusion.matz
* eval.c (rb_thread_schedule): should check time only if BOTH WAIT_SELECT and WAIT_TIME. * string.c (rb_str_split_m): no need to consider KANJI characters, if the length of separator is 1 (byte). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-01-23* eval.c (rb_yield_0): restore source file/line after yield.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-01-21* eval.c (ruby_stop): should not trace error handler.matz
* io.c (io_write): should not raise exception on O_NONBLOCK io. * dir.c (dir_set_pos): seek should return dir, pos= should not. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-01-16* eval.c (block_pass): should not pass tainted block, if $SAFE > 0.matz
* variable.c (rb_mod_remove_cvar): should pass the char*. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-01-10* class.c (rb_make_metaclass): [new]nobu
* class.c (rb_define_class_id): use rb_make_metaclass(), don't call Class#inherited hook. * class.c (rb_class_inherited): [new] * class.c (rb_define_class): call Class#inherited hook here. * class.c (rb_define_class_under): ditto after class path is set. * class.c (rb_singleton_class): use rb_make_metaclass(). * eval.c (rb_eval): same as rb_define_class_under(). * intern.h: prototypes of rb_make_metaclass() and rb_class_inherited(). * object.c (rb_class_s_new): use rb_make_metaclass() and rb_class_inherited(). * object.c (Init_Object): use rb_make_metaclass(). * struct.c (make_struct): use rb_class_inherited(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-01-10* eval.c (rb_add_method): should clear cache by id always.nobu
* eval.c (rb_disable_super): no longer need to clear cache before rb_add_method(). * eval.c (rb_export_method): ditto. * eval.c (rb_attr): ditto. * eval.c (rb_undef): ditto. * eval.c (rb_eval): ditto. * eval.c (rb_mod_modfunc): ditto. * eval.c (rb_mod_define_method): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-01-08* eval.c (rb_add_method): clear replaced method from the cache.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-12-20* eval.c (rb_mod_define_method): must not convert Method to Proc.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-12-19* eval.c (rb_mod_define_method): define_method should followmatz
default method visibility. * eval.c (rb_attr): should warn if the default method visibility is "module_function" (can be error). * eval.c (rb_mod_define_method): should define class/module method also if the visibility is "module_function". * eval.c (rb_mod_define_method): should call hook method "method_added", and "singleton_method_added". * ext/socket/socket.c (bsock_send): should raise EWOULDBLOCK exception. * ext/socket/socket.c (s_recvfrom): ditto. * ext/socket/socket.c (s_accept): ditto. * ext/socket/socket.c (udp_send): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-12-18* eval.c (rb_thread_schedule): should not select a thread which ismatz
not yet initialized. * variable.c (find_class_path): should initialize iv_tbl if it's NULL. * class.c (rb_define_class): should return the existing class if the class is already defined and its superclass is ideintical to the specified superclass. * class.c (rb_define_class_under): ditto. * class.c (rb_define_module): should return the existing module if the module is already defined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-12-17* intern.h: add prototypes.nobu
rb_str_dup_frozen() * ruby.h: added declaration. rb_defout, rb_stdin, rb_stdout, rb_stderr, ruby_errinfo * rubyio.h: changed double include guard macro to RUBYIO_H. * array.c (inspect_call): make static. * eval.c (dvar_asgn): ditto. * io.c (rb_io_close_read): ditto. * lex.c (rb_reserved_word): ditto. * ruby.c: (req_list_head, req_list_last): ditto. * ruby.c (require_libraries): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-12-03* time.c (time_new_internal): round usec overflow and underflowmatz
here. * time.c (time_plus): remove overflow/underflow check. * time.c (time_minus): ditto. * time.c (time_cmp): should consider tv_usec too. * time.c (time_gmtime): time_modify() should be called even if tm struct is not calculated yet. * string.c (rb_str_equal): object with to_str must be treated as a string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-11-28* eval.c (rb_thread_select): should subtract timeofday() frommatz
limit, not reverse. * util.c (scan_hex): x is not a hexadecimal digit. * eval.c (rb_thread_schedule): should treat the case that select(2) returns 0, if a thread is under both WAIT_SELECT and WAIT_TIME. Jakub Travnik <J.Travnik@sh.cvut.cz> actually fixed this bug. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-11-21* parse.y (str_extend): should check nesting parentheses in #{}.matz
* eval.c (rb_thread_select): tv_sec and tv_usec should not be negative. * signal.c (posix_signal): do not set SA_RESTART for SIGVTALRM. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-11-19* eval.c : oops.eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-11-19* eval.c : fix typo. erestart -> errno. rb_thread_wait_for().eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-11-19* parse.y (parse_regx): should raise error on untermitatedmatz
expression interpolation. * pack.c (pack_unpack): should give length to utf8_to_uv(). * pack.c (utf8_to_uv): add length check. * eval.c (rb_thread_wait_for): select may cause ERESTART on Solaris. * eval.c (rb_thread_select): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1841 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-11-13* signal.c (sighandle): should not re-register sighandler ifmatz
POSIX_SIGNAL is defined. * eval.c (error_print): errat array may be empty. * parse.y (yylex): float '1_.0' should not be allowed. * variable.c (var_getter): should care about var as Qfalse (ruby-bugs#PR199). * array.c (cmpint): <=> or block for {min,max} may return bignum. * array.c (sort_1): use rb_compint. * array.c (sort_2): ditto. * enum.c (min_ii): ditto. * enum.c (min_ii): ditto. * enum.c (max_i): ditto. * enum.c (max_ii): ditto. * mkconfig.rb: use String#dump to generate Ruby string literal. * range.c (range_eql): should override 'eql?' git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-11-08* eval.c (rb_trap_eval): avoid annoying warning with signal.nobu
[ruby-talk:23225] * eval.c (rb_call0): adjust caller source file/line while evaluating optional arguments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-11-07* dir.c (my_getcwd): do not rely on MAXPATHLEN.matz
* eval.c (rb_yield_0): should not call rb_f_block_given_p(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-31* eval.c (exec_under): should initialize ruby_frame->self;matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-31* eval.c (POP_VARS): should not set DVAR_DONT_RECYCLE if _oldmatz
ruby_vars is already force_recycled. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-30* eval.c (rb_f_eval): can't modify untainted binding.matz
* regex.c (re_compile_pattern): should preverve p0 value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-29* parse.y (str_extend): shuould allow interpolation of $-x.matz
* bignum.c (rb_big_eq): convert Bignum to Float, instead of reverse. * time.c (time_localtime): getting tm should not be prohibited for frozen time objects. * time.c (time_gmtime): ditto. * version.c (Init_version): freeze RUBY_VERSION, RUBY_RELEASE_DATE, and RUBY_PLATFORM. * file.c (Init_File): freeze File::SEPARATOR, ALT_SEPARATOR and PATH_SEPARATOR. * file.c (rb_stat_cmp): should check operand type before calling get_stat(). * eval.c (rb_eval_cmd): should not invoke "call" with a block on any occasion. * numeric.c (fix_aref): idx may be a Bignum. * numeric.c (num_remainder): a bug in Numeric#remainder. * eval.c (rb_exec_end_proc): END might be called within END block. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-16* eval.c (rb_f_missing): check stack level with rb_stack_check().nobu
* eval.c (rb_call0): ditto. * eval.c, intern.h (rb_stack_check): added. [new] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-09eval.c commit.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-09* eval.c (thread_status_name): separated fromnobu
rb_thread_inspect(). return string expression for thread status. * eval.c (rb_thread_status, rb_thread_inspect): use thread_status_name(). * eval.c (rb_thread_priority_set): return the priority not but self. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-02* eval.c (rb_eval): should override existing class.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-02* ext/socket/socket.c (unix_addr): getsockname(2) may result len = 0.matz
* ext/socket/socket.c (unix_peeraddr): getpeername(2) may result len = 0. * eval.c (POP_BLOCK): rb_gc_force_recycle() was called too much. Should not be called if SCOPE_DONT_RECYCLE is set. * string.c (rb_str_substr): should return an instance of receiver's class. * string.c (rb_str_succ): ditto. * array.c (rb_ary_subseq): ditto. * string.c (rb_str_reverse): should return an instance of reciever's class. * string.c (rb_str_times): ditto. * array.c (rb_ary_times): ditto * string.c (str_gsub): 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@1760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-09-18small last minute changes (eval.c, file.c)matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-09-08* eval.c (rb_thread_restore_context): save current value ofmatz
lastline and lastmatch in the thread struct for later restore. * eval.c (rb_thread_save_context): restore lastline and lastmatch. * numeric.c (flo_to_s): should handle negative float value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-09-06* class.c (rb_include_module): should check whole ancestors tomatz
avoid duplicate module inclusion. * string.c (trnext): should check backslash before updating "now" position. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-09-03* eval.c (rb_f_require): should check static linked libraries\eban
before raising exception(from 1.7). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-09-03* io.c (rb_io_popen): accept integer flags as mode.matz
* file.c (rb_find_file_ext): extension table can be supplied from outside. renamed. * eval.c (rb_f_require): replace rb_find_file_noext by rb_find_file_ext. * eval.c (rb_provided): should also check feature without extension. * numeric.c (flo_to_s): do not rely on decimal point to be '.' * parse.y (yylex): ternary ? can be followed by newline. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-08-23* eval.c (is_defined): should not dump core for "defined?(())".matz
* eval.c (umethod_bind): recv can be an instance of descender of oklass if oklass is a Module. * hash.c (rb_hash_equal): check identiry equality first. * variable.c (mod_av_set): detect constant overriding for built-in classes/modules. * marshal.c (w_object): should retrieve __member__ data from non-singleton class. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-08-06* eval.c (rb_mark_end_proc): should mark ruby_cref, maybe shouldmatz
not be here, but it's simplest way for a kludge. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-08-06* struct.c (rb_struct_modify): should check frozen and taintmatz
status. * eval.c (rb_undefined): do not recurse if method_missing is undefined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-27* eval.c (rb_provided): extension should be guessed usingmatz
rb_find_file_noext(). * eval.c (rb_f_require): should call rb_feature_p() after extension completion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e