summaryrefslogtreecommitdiff
path: root/sample
AgeCommit message (Collapse)Author
2003-06-10* sample/test.rb: add block to proc to avoid warning.eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-07* parse.y (value_expr0): class and module statements should not bematz
warned for "void value expression". [ruby-talk:72989] * gc.c (add_final): should determine type by respond_to? * gc.c (define_final): ditto. * io.c (rb_io_ctl): should not depend on respond_to? * range.c (range_step): rb_check_string_type(). * process.c (proc_setgroups): new functions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-29* win32/win32.c (_CRTIMP): redefine _CRTIMP on MinGW.eban
* configure.in: remove '-D__USE_CRTIMP' from XCFLAGS on MinGW. * win32/win32.c (NtMakeCmdVector): handle quotes only if not instring. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-26* eval.c (Init_Proc): Block/Proc separation. [huge change]matz
* eval.c (block_arity): returns exact arity number for Procs out of methods. also gives 1 for {|a|..}. * string.c (rb_str_match): revert use of String#index for invocation like string =~ string. * eval.c (rb_Array): move Object#to_a exclusion hack from splat_value(). need to be in eval.c for a while. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-21* error.c (rb_sys_fail): should not specify errno explicitly.matz
[ruby-dev:20264] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-20* eval.c (rb_yield_0): give warning for multiple values for amatz
block parameter. * eval.c (rb_yield_values): a function to yield multiple values. * array.c (sort_1): use rb_yield_values. * enum.c (min_ii, max_ii): ditto. * hash.c (rb_hash_update_block_i, delete_if_i, select_i, each_pair_i, env_each, env_reject_bang, env_select, env_update_i): ditto. * struct.c (rb_struct_each_pair): ditto. * eval.c (top_include): should include module in the current self, not ruby_top_self. [ruby-dev:20198] * eval.c (top_include): stop inclusion to ruby_wrapper; give warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-19* ext/pty/pty.c (pty_finalize_syswait): join (using Thread#value)matz
before detach pid. [ruby-talk:71519] * eval.c (PUSH_FRAME): save outer ruby_block. [ruby-list:37677], [ruby-dev:20202] * eval.c (BEGIN_CALLARGS): restore outer block by using ruby_block->outer. * eval.c (block_pass): do not alter block->prev, but block->outer. * array.c (get_inspect_tbl): warning on wrong condition. * eval.c (localjump_xvalue): renamed exitstatus to exit_value since it's not exit "status" after all. * eval.c (localjump_error): add reason to LocalJumpError. * compar.c (rb_cmpint): raise error via rb_cmperr(), if cmp value is nil. now take new 2 arguments. * time.c (time_cmp): 2003-05-16 fix was incomplete. (ruby-bugs-ja:PR#458) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-18use warn() instead of $stderr.puts().tadf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-16* object.c (rb_class_allocate_instance): singleton class checkmatz
moved to rb_obj_alloc(). (ruby-bugs-ja PR#345) * re.c (rb_reg_quote): should escape white space characters, \t, \f, \n, \r. (ruby-bugs-ja PR#231) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-05use values_at instead of select.tadf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-05* sample/test.rb: substitute 'select' with 'values_at'.eban
* lib/date.rb: ditto. * lib/parsedate.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-20* sample/test.rb: avoid the MSVCRT *printf problem(float).eban
[ruby-dev:20037] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-18* struct.c (rb_struct_eql): should compare values with "eql?".matz
* range.c (range_check): <=> returns nil for invalid values; should check. * regex.c (re_compile_pattern): should not set RE_OPTIMIZE_ANCHOR, if anychar_repeat is enclosed by parentheses. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-14* bignum.c (rb_cstr_to_inum, rb_big2str): allow 2-36 as radix.nobu
* numeric.c (rb_fix2str): ditto. * string.c (rb_str_to_i): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-11* sample/test.rb: NaN comparison test.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-05* sample/exyacc.rb: use Regexp in gsub!.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-04* eval.c (assign): should prepare mrhs by svalue_to_mrhs().matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-26* eval.c (avalue_splat): new function to do unary * (splat)matz
operator. * eval.c (avalue_to_svalue,svalue_to_avalue,svalue_to_mrhs): do not use implicit "to_ary" conversion. * ext/curses/curses.c (GetWINDOW,GetMOUSE): add taint check. * ext/curses/curses.c (curses_init_screen): ditto. * ext/curses/curses.c (window_initialize): ditto. * gc.c (os_each_obj): prohibit ObjectSpace#each_object in safe mode ($SAFE >= 4). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-25* signal.c (trap): return "DEFAULT" and "IGNORE" respectively formatz
previous sighandler SIG_DFL and SIG_IGN. [ruby-talk:67860] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-10* eval.c (massign): remove unnecessary array unpacking; it shouldmatz
be handled before massign() by svalue_to_mrhs(). * eval.c (svalue_to_mrhs): '*a = v' value conversion to avalue (i.e. [1] => [[1]], [1,2] => [1,2]). * eval.c (rb_eval): use svalue_to_mrhs. * eval.c (rb_yield_0): ditto. * eval.c (proc_invoke): break from "Proc#yield" is legal. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-03* parse.y (arg): parse 'lhs = a rescue b' as 'lhs=(a rescue b)'.matz
* io.c (rb_io_fread): should not clearerr() if there's no filled buffer (i.e. rb_io_fread() returning zero). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-02-16* file.c (file_expand_path): buffer might be reallocated whilenobu
expanding default directory. * file.c (file_expand_path): default directory was being ignored if path was full path with no drive letter, under DOSISH. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-02-14* file.c (file_expand_path): fix surplus path separators whilenobu
expanding at root directory. [ruby-dev:19572] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-02-13*** empty log message ***nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-02-13* range.c (range_step): step might be float 0 < x < 1.matz
* eval.c (rb_thread_schedule): pause if no runnable thread when there's only one thread. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-02-04* array.c (rb_ary_equal): a == b is true when b is non T_ARRAYmatz
object, if b has "to_ary" and b == a. * hash.c (rb_hash_equal): a == b is true when b is non T_HASH object, if b has "to_hash" and b == a. * string.c (rb_str_equal): a == b is true when b is non T_STRING object, if b has "to_str" and b == a. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-02-03* re.c (rb_memsearch): algolithm body of String#index.matz
* error.c (Init_Exception): "to_str" removed. * eval.c (eval): should not rely on Exception#to_str * eval.c (compile_error): ditto. * error.c (err_append): ditto. * hash.c (rb_hash_merge): Hash#merge, non destructive "update". now there's also Hash#merge! which is an alias to "update". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-20* regex.c (is_in_list): should work weill with UTF-8.matz
* regex.c (re_match_exec): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-07* hash.c (env_clear): new Hash compatible method.matz
* hash.c (env_shift): ditto. * hash.c (env_invert): ditto. * hash.c (env_replace): ditto. * hash.c (env_update): ditto. * array.c (rb_ary_join): dispatch based on "to_str". * array.c (rb_ary_times): ditto. * array.c (rb_ary_equal): ditto. * process.c (rb_f_exec): dispatch based on "to_ary". * eval.c (umethod_bind): exact class match is not required. relax the restriction to subclasses. * eval.c (rb_eval): call "inherited" before executing class body. * class.c (rb_define_class): call "inherited" after defining the constant. * class.c (rb_define_class_under): ditto. * eval.c (massign): expand first element if RHS is an array and its size is 1, and LHS has concrete assignment target (i.e. LHS has target(s) other than *var). * eval.c (massign): avoid unnecessary avalue/svalue conversion. * eval.c (rb_yield_0): ditto * array.c (rb_ary_update): do not allocate unused array if rpl is nil (i.e. merely removing elements). * io.c (io_read): should resize supplied string if it's shorter than expected. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-01* eval.c (massign): removed awkward conversion between yvalue,matz
mvalue, etc. * eval.c (rb_yield_0): new parameter added to tell whether val is an array value or not. * parse.y (yield_args): restructuring: new nodes: NODE_RESTARY2, NODE_SVALUE; removed node: NODE_RESTARGS. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-19Improve.knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-19Be consistent on the use of the implicit $_.knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-19Improve.knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-19Fix a bug.knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-19The use of $_ and ~/RE/ is discouraged.knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-19Strive to give better examples.knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-18* bin/irb: Moved from sample/irb.rb.knu
* instruby.rb: Install script files under bin/ with ruby's program prefix and suffix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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