summaryrefslogtreecommitdiff
path: root/sample
AgeCommit message (Collapse)Author
2002-10-02ditto.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-07-26* sample/mkproto.rb: ditto and fix bug.eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-07-11* string.c (rb_str_slice_bang): if there's no correspondingmatz
substring, slice! should return nil without exception. * array.c (rb_ary_insert): type fixed. * string.c (rb_str_split_m): accept separator value nil as well. * string.c (rb_str_become): was leaking memory. * class.c (rb_include_module): should not alter other classes/modules by inclusion. by this fix, local order may not be preserved for some cases. * class.c (include_class_new): module may be T_ICLASS; retrieve original module information. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-28* re.c (rb_reg_expr_str): need to process backslashes properly.matz
* object.c (rb_any_to_a): declare Object#to_a to be obsolete. * object.c (rb_Array): do not convert nil into [] automagically. * object.c (rb_Integer): use "to_int" instead of "to_i". [experimental] * object.c (nil_to_f): new method. * object.c (rb_Integer): Symbols and nil should cause error. * object.c (rb_Float): nil should cause error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-24* eval.c (rb_eval): NODE_EVSTR is no longer used.nobu
* eval.c (eval): not enforce to make assigned variables dynamic. * parse.y (string): split rules to strings/xstring/regexp to allow arbitrary statements inside string interpolation. * parse.y (here_document): splitted into three phases. * parse.y (literall_append, literal_concat): added. append/concatinate string literals. * sample/test.rb (valid_syntax): adjust line number for BEGIN. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-22updated to the new version (based on date2 3.3).tadf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-13ext/exmk.rb.in, lib/singleton.rb: remove nested ""s.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-11* eval.c (rb_eval): ruby_frame->last_func may be null, if it'smatz
called outside of a method. * parse.y (arg): use INT2NUM, not INT2FIX for tUMINUS. * parse.y (arg): unnecessary negative tPOW treatment. * parse.y (tokadd_escape): wrong backslash escapement. * parse.y (stmt,arg): too much void value check. * parse.y (stmt,arg): need to check void value on rules which does not use node_assign(). * ext/socket/socket.c (ipaddr): need not to taint hostnames. * range.c (range_include): should be based on "<=>", whereas member? still is based on "each". * range.c (range_min,range_max): redefine methods based on "<=>". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-06* sample/biorhythm.rb (getPosiiton,etc)H_Konishi
fix at changing Date module ( Date is changed Fixnum to Rational ) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-18updated to the new version (based on date2 3.2.1).tadf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-17* sampl/test.rb: use eval instead of './miniruby -c',eban
in order to check a syntax error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-14* eval.c (rb_clear_cache_by_class): new function.matz
* eval.c (set_method_visibility): should have clear cache forq updated visibility. * numeric.c (flo_to_s): default format precision to be "%.16g". * util.c (ruby_strtod): use own strtod(3) implementation to avoid locale hell. Due to this change "0xff".to_f no longer returns 255.0 * eval.c (avalue_to_yvalue): new function to distinguish yvalue (no-arg == Qundef) from svalue (no-arg == Qnil). * eval.c (rb_yield_0): use avalue_to_yvalue(). * eval.c (assign): warn if val == Qundef where it means rhs is void (e.g. yield without value or call without argument). * parse.y (value_expr): need not to warn for WHILE and UNTIL, since they can have return value (via valued break). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-19* re.c (rb_reg_search): should clear last_match if pos is out ofmatz
string range. * string.c (rb_str_index_m): ditto. * string.c (rb_str_rindex): ditto. * class.c (rb_define_class): should handle autoload. * class.c (rb_define_module): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-12* regex.c (re_compile_pattern): '\0111' should be '\011' plus '1',matz
since octal literals are formed by three digits at most. * marshal.c (w_object): module inclusion using extend() should also be detected. * eval.c (rb_eval_cmd): cbase should not be NULL; it should be either ruby_wrapper or Object. * enum.c (enum_each_with_index): should return self. * process.c (proc_setpgrp): should return value for non-void function. * process.c (proc_getpgid): should raise exception if getpgid() return -1. * string.c (rb_str_ljust): should return a duplicated string. * string.c (rb_str_rjust): ditto. * string.c (rb_str_center): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-08* eval.c (cvar_cbase): utility function to find innermost nonmatz
singleton cbase. * eval.c (is_defined): adopt new cvar behavior. * eval.c (rb_eval): ditto. * eval.c (assign): ditto. * class.c (rb_mod_clone): should not call rb_obj_clone(), since Module does not provide "allocate". * class.c (rb_singleton_class): should crate new singleton class if obj is a class or module and attached object is different, which means metaclass of singleton class is sought. * time.c (time_s_alloc): now follows allocation framework. * eval.c (rb_eval): should initialize outer class variables from methods in singleton class definitions. * eval.c (assign): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-25commit miss.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-25* sample/test.rb (system): test with scripts under the sourcenobu
directory. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-19* file.c (path_check_1): do not warn on world writable *parent*matz
directories. * class.c (rb_include_module): should preserve ancestor order in the included class/module. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-19* eval.c (rb_eval_string_wrap): should hide the toplevel localmatz
variable bindings by PUSH_SCOPE(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-15* bignum.c (rb_big_rshift): should properly convert the nagativematz
value to 2's compliment. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-13* parse.y (stmt): local variable declaration order was changedmatz
since 1.6 * parse.y (arg): ditto. * pack.c (pack_pack): add templates 'q' and 'Q'. * pack.c (pack_unpack): ditto. * bignum.c (rb_quad_pack): new utility function. * bignum.c (rb_quad_unpack): ditto. * parse.y (assignable): should emit CVASGN within the method body. * dir.c (dir_s_glob): should not warn even if no match found. * eval.c (rb_eval): clean up class variable behavior. * eval.c (assign): ditto. * eval.c (is_defined): ditto. * variable.c (rb_mod_class_variables): need not to call rb_cvar_singleton(). * variable.c (rb_cvar_singleton): removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-01-16* st.c: primes should be primes.matz
* eval.c (is_defined): method defined? check should honor protected too. * eval.c (block_pass): should not pass tainted block, if $SAFE > 0. * variable.c (rb_mod_remove_cvar): should pass the char*. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-12-18* sample/test.rb: Hash#indexes -> Hash#select.eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-12-10* array.c (rb_ary_modify): should copy the internal buffer if thematz
modifying buffer is shared. * array.c (ary_make_shared): make an internal buffer of an array to be shared. * array.c (rb_ary_shift): avoid sliding an internal buffer by using shared buffer. * array.c (rb_ary_subseq): avoid copying the buffer. * parse.y (gettable): should freeze __LINE__ string. * io.c (rb_io_puts): old behavoir restored. rationale: a) if you want to call to_s for arrays, you can just call print a, "\n". b) to_s wastes memory if array (and sum of its contents) is huge. c) now any object that has to_ary is treated as an array, using rb_check_convert_type(). * hash.c (rb_hash_initialize): now accepts a block to calculate the default value. [new] * hash.c (rb_hash_aref): call "default" method to get the value corrensponding to the non existing key. * hash.c (rb_hash_default): get the default value based on the block given to 'new'. Now it takes an optinal "key" argument. "default" became the method to get the value for non existing key. Users may override "default" method to change the hash behavior. * hash.c (rb_hash_set_default): clear the flag if a block is given to 'new' * object.c (Init_Object): undef Data.allocate, left Data.new. * ext/curses/curses.c (window_scrollok): use RTEST(). * ext/curses/curses.c (window_idlok): ditto. * ext/curses/curses.c (window_keypad): ditto. * ext/curses/curses.c (window_idlok): idlok() may return void on some platforms; so don't use return value. * ext/curses/curses.c (window_scrollok): ditto for consistency. * ext/curses/curses.c: replace FIX2INT() by typechecking NUM2INT(). * parse.y (str_extend): should not process immature #$x and #@x interpolation, e.g #@#@ etc. * enum.c (enum_sort_by): sort_by does not have to be stable always. * enum.c (enum_sort_by): call qsort directly to gain performance. * util.c (ruby_qsort): ruby_qsort(qs6) is now native thread safe. * error.c (rb_sys_fail): it must be a bug if it's called when errno == 0. * regex.c (WC2MBC1ST): should not pass through > 0x80 number in UTF-8. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-11-19* parse.y (str_extend): should not terminate string interpolationmatz
with newlines in here-docs and newline terminated strings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1848 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. * eval.c (rb_eval_cmd): should not upgrade safe level unless explicitly specified by argument newly added. * signal.c (sig_trap): should not allow tainted trap closure. * variable.c (rb_f_trace_var): should not allow trace_var on safe level higher than 3. * variable.c (rb_f_trace_var): should not allow tainted trace closure. * gc.c: do not use static stack until system stack overflows. * eval.c (eval): should call Exception#exception instead of calling rb_exc_new3() directly. * error.c (exc_exception): set "mesg" directly to the clone. it might be better to set mesg via some method for flexibility. * variable.c (cvar_override_check): should print original module name, if 'a' is T_ICLASS. * 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-11-08* process.c (security): always give warning for insecure PATH.matz
* dir.c (my_getcwd): do not rely on MAXPATHLEN. * file.c (rb_file_s_readlink): ditto. * file.c (path_check_1): ditto. * eval.c (rb_yield_0): should not call rb_f_block_given_p(). * string.c (rb_str_chomp_bang): should terminate string by NUL. * eval.c (rb_yield_0): better error message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-22* class.c (rb_mod_clone): should not copy class name, since clonematz
should remain anonymous. * eval.c (rb_call0): self in a block given to define_method now be switched to the receiver of the method. * eval.c (proc_invoke): added new parameter to allow self switching. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-23* eval.c (svalue_to_avalue): new conversion scheme between singlematz
value and array values. * eval.c (avalue_to_svalue): ditto. * eval.c (rb_eval): REXPAND now uses avalue_to_svalue(), return and yield too. * eval.c (rb_yield_0): use avalue_to_svalue(). * eval.c (proc_invoke): Proc#call gives avaules, whereas Proc#yield gives mvalues. * eval.c (bmcall): convert given value (svalue) to avalue. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-22* eval.c (rb_yield_0): no mvalue_to_svalue conversion here.matz
* eval.c (massign): takes svalue, convert it to mvalue inside. * eval.c (rb_eval): parameters for yield/return are always svalues now. * eval.c (svalue_to_mvalue): more strict conversion. * eval.c (mvalue_to_svalue): ditto. * st.c (new_size): prime hash size enabled. * ext/socket/socket.c (Init_socket): SO_* constants added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-19* eval.c (svalue_to_mvalue): new function to convert from svaluematz
to mvalue. [experimental] * eval.c (mvalue_to_svalue): new function to convert from mvalue to svalue. * eval.c (rb_eval): use mvalue_to_svalue(). * eval.c (rb_yield_0): use mvalue_to_svalue(). * eval.c (proc_invoke): proper mvalue handling. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-08* gc.c (Init_stack): avoid __builtin_frame_address(2) to retrievematz
stack bottom line. * st.c (numhash): should shuffle bits by dividing by prime number. * eval.c (rb_eval): multiple assignment behavior fixed, which results "*a = nil" makes "a == []" now. * eval.c (rb_f_require): should set SCOPE_PUBLIC before calling dln_load(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-05-26Synchronize MANIFEST with reality. Add missing files.knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-05-07Obsoleted by IRB.knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-05-06forgot some checkins.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-04-30Merge from irb 0.7.3.knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1341 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-12-28changes from personal modifies -- matzmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-11-27matzmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-11-16matzmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-11-01matzmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-10-31matzmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-10-10matzmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-10-02matzmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-09-27matzmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-09-19000919matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-09-15matzmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-07-31matz - biorhythm.rbmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-07-25matzmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-07-18matzmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-07-14matzmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e