summaryrefslogtreecommitdiff
path: root/ext
AgeCommit message (Collapse)Author
2002-08-28* ext/stringio/stringio.c (strio_initialize): RSTRING(mode)->ptrnobu
can be NULL. * ext/stringio/stringio.c (strio_ungetc): fix buffer overflow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-21* eval.c (rb_thread_cleanup): should not modify the globalmatz
variable curr_thread. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-19* array.c (sort_2): *a - *b may overflow.matz
* array.c (ary_new): len*sizeof(VALUE) may be a positive value. * array.c (rb_ary_initialize): ditto. * object.c (rb_class_allocate_instance): move singleton class check from rb_obj_alloc(). * re.c (rb_reg_initialize): should not modify frozen Regexp. * ext/tcltklib/tcltklib.c (ip_init): allocation framework. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-13ole_invoke: retry when calling by reference is fail.suke
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-13* hash.c (rb_hash_replace): should copy ifnone.matz
* hash.c (rb_hash_dup): should preserve HASH_PROC_DEFAULT and HASH_DELETED flags. * hash.c (rb_hash_shift): shift from empty hash should not return its default proc. * hash.c (rb_hash_default_proc): new method. [new] * array.c (rb_ary_aref): no need for Bignum check. * array.c (rb_ary_aset): explicit Bignum check removd. * numeric.c (fix_aref): normalize bignum before bit-op. * bignum.c (rb_big_rand): max may be Bignum zero. * bignum.c (rb_cstr_to_inum): should normalize bignums, to avoid returning fixable bignum value. * bignum.c (rb_uint2big): there should be no zero sized bignum. * ext/extmk.rb.in: extmake() that works properly for both tkutil (tk/tkutil.so) and digest/sha1. * hash.c (rb_hash_equal): should check HASH_PROC_DEFAULT too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-12* bignum.c (rb_big_cmp): use dbl2big() for Floats, instead ofmatz
big2dbl(). * bignum.c (Init_Bignum): rb_big_zero_p() removed. There may be Bignum zero. * eval.c (rb_call0): new argument added for original method name. preserve original method name in frame->orig_func. * eval.c (is_defined): use frame->orig_func, not last_func. * eval.c (rb_eval): ditto. * eval.c (method_call): supply data->oid also to rb_call0(). * object.c (rb_class_allocate_instance): call rb_obj_alloc() when called from alias, thus invoke original "allocate". * eval.c (remove_method): removing allocate from classes should cause NameError. * hash.c (rb_hash_equal): should check default values. * ext/socket/socket.c (s_recvfrom): update RSTRING len. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-10* win32ole.c(WIN32OLE#ole_methods): list up all methods.suke
* win32ole.c(WIN32OLE#ole_method_help): get all method information. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-09* ext/Win32API/extconf.rb: check existence of <windows.h>.eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-06* ext/racc/cparse/cparse.c: reduce goto.aamine
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-06typonobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-06* ext/racc/cparse/cparse.c (parse_main): avoid GCC 3 warning.eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-05* MANIFEST: add lib/racc/parser.rb.aamine
* ext/racc/cparse/cparse.c: code refine. * ext/racc/cparse/MANIFEST: add depend. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-05Multiple call of the initialize.ttate
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-04Conform to the allocation framework.ttate
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-04* ext/curses/curses.c: follow allocation framework.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-02* ext/strscan/strscan.c: follow allocation framework.aamine
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-01* parse.y (tokadd_string): ignore backslashed spaces in %w.matz
* enum.c (enum_find): do not use rb_eval_cmd(); should not accept a string for if_none. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-07-30Get rid of "return".ttate
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-07-30* ext/tcltklib/stubs.c (ruby_tcltk_stubs): win32_getenv returnseban
the same address always, so allocate string by ruby_strdup. * win32/win32.c: prototype; rb_w32_open_osfhandle(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-07-29* ext/extmk.rb.in: always use File.expand_path for $top_srcdir.eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-07-26* ext/extmk.rb.in (create_makefile): use Regexp in gsub.eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-07-26* random.c: replace with Mersenne Twister RNG.matz
* eval.c (jump_tag_but_local_jump): preserve retval in LocalJumpError exceptions. * parse.y (command): no more check for "super outside of method". * eval.c (rb_mod_define_method): should set last_class and last_func in the block->frame. * eval.c (error_handle): should handle TAG_THROW as well. * parse.y (yylex): new decimal notation '0d4567'. * parse.y (yylex): new octal notation '0o777'. * parse.y (string_content): every string_content node should return string only. use NODE_EVSTR to coercing. * eval.c (rb_eval): NODE_EVSTR support. * re.c (rb_reg_quote): avoid unnecessary string allocation. * string.c (get_pat): quote metachracters before compiling a string into a regex. * string.c (rb_str_split_m): special treatment of strings of size 1, but AWK emulation. now uses get_pat(). * string.c (rb_str_match_m): quote metacharacters. * string.c (rb_str_match2): ditto. * ext/socket/socket.c (sock_addrinfo): make all 3 versions of getaddrinfo happy. [ruby-core:00184] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-07-11* ext/stringio/stringio.c (strio_gets_internal): fixed for recordnobu
separator longer than 1. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2635 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-27Add Importable::symbol.ttate
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2604 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-20* ext/readline/readline.c (readline_readline): get rid ofnobu
libreadline's bug. (ruby-bugs-ja:PR#268) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-19* ext/extmk.rb, lib/mkmf.rb (xsystem): open the log file if xsystem is called.eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-18* parse.y (yylex): obsolete '?<whitespace>'; use '?\s', '?\n',matz
etc, instead. * parse.y (yylex): no here document after a dot. * parse.y (yylex): should have set lex_state after '`'. * parse.y (yylex): should have set lex_state properly after tOP_ASGN. * bignum.c (rb_big2dbl): return canonical HUGE_VAL for infinity. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2579 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-12avoid some warningssuke
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-11Include ctype.h for isdigit().ttate
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-11Check the length of proto.ttate
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-11Get rid of STR2CSTR. (Thanks N.Nakada)ttate
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-11bugfix. (Thanks U.Nakamura)ttate
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2552 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-11new platform [bccwin32] merged.H_Konishi
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-10bugfix.ttate
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-10Add DL::Importable::Internal::callback().ttate
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-10dl.c (rb_dl_scan_callback_args): memcpy() -> cast and substitutionttate
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-09Get rid of rb_dl_set_callback() and rb_dl_get_callback().ttate
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-09* ext/dl: change the callback mechanism.ttate
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-05* tcltklib.c:nagai
Stop the running zombi-eventloop when mainloop_watchdog is killed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-04* ext/Win32API/extconf.rb: refactoring.eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-04* ext/socket/extconf.rb: The IPv6 stack of Cygwin is still incomplete.eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-04* ext/tcltklib/tcltklib.c (Init_tcltklib): moved the definition before actions.eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-04* ext/tk/lib/tkentry.rb: typo fix(!! -> ||).eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-04* string.c (rb_str_aset): should raise error if an indexing stringmatz
is not found in the receiver. * sprintf.c (rb_f_sprintf): "%d" should convert objects into integers using Integer(). * lib/tempfile.rb (Tempfile::size): added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-04* tkfont.rb: Fix bugs on TkFont.init_widget_font for Tk8.x.nagai
* tkafter.rb: Add self to 1st argument of interval- and loop-proc TkAfter#current_interval returns an interval (sleep) time value TkAfter#current_args returns an array of arguments TkAfter#return_value returns a return value of last loop-proc e.g. TkAfter.new( proc{|obj| 500 - obj.current_interval}, 10, [proc{|obj| p obj.current_args}, 'proc', 1], proc{|obj| p obj.current_args; ['return', 2]}, [proc{|obj| p obj.return_value p ['proc', obj.current_args[0].call(obj.return_value[1], obj.current_args[1])]}, proc{|*args| args[0] + args[1]}, 1], proc{p ['proc', 4]} ).start(100) * tk*.rb: Allow to use Symbols for parameters. Allow new notation of constructor (also allow old notation). e.g. TkFrame.new('classname'=>'User'){|base| pack f = TkFrame.new(base, :classname=>'ButtonFrame').pack TkButton.new( :parent => f, :text => 'Quit', :command => proc{exit} ).pack( :fill => :x, :pady => 2 ) } * tkcanvas.rb: (TkcItem) Add 'coords' parameter to the canvas item constructor (for new notation of constructor). e.g. c = TkCanvas.new.pack l = TkcLine.new(c, :coords=>[[0,0], [100,100]]) * tcltklib.c: New 'mainloop' and 'mainloop_watchdog'. The priority of their event-loop can be controlled. They accept an optional argument. If it false, they don't exit although the root widget is destroyed. This function is sometimes useful, if it is used with 'restart'. 'mainloop' can't treat Thread#join/value in a callback routine. (e.g. TkButton.new(:command=>proc{p Thread.new{button.invoke}.value}) ) 'mainloop_watchdog' can treat them, but watchdog thread is always running (so, a little heavier than 'mainloop'). If the purpose of using Thread#join/value is to do something under some safe-level, please use Proc object. (e.g. :command=>proc{$SAFE=1;proc{$SAFE=2;button.invoke}.call;p $SAFE}) * tk.rb: Support functions of new 'mainloop' and 'mainloop_watchdog'. * tk.rb: (Tk.restart) Add 'app-name' paramater and 'use' parameter. 'app-name' specifies the name and the resource class of the application. If 'app-name' is specified to 'xxx', the application class on the resource database is set to 'Xxx' and the application name is changed by the same rule of Tk.appname method. 'use' specifies the main window for embedding the root widget instead of generating a new window. * tk.rb: Add new parameter 'widgetname' to the widget constructor to support effective use of Resource Database. For example, the resource 'Xxx*quit.text: QUIT' can set the text of the button generated by the following code. e.g. Tk.restart('Xxx') TkButton.new(nil, 'widgetname'=>'quit', 'command'=>proc{exit}).pack Tk.mainloop * tk.rb: TkOption::get always returns a tainted string. Add TkOption::new_proc_class. It generates a class to import procedures defined on the resource database. For example, there is a following resource file. ----< resource-test >------------ *CMD.foo: {|*args| p [$SAFE, :foo, args]} *CMD.XXX.bar: {|*args| p [$SAFE, :bar, args]} *Button.command: ruby {p self; p $SAFE; TkOption::CMD::XXX.bar(1,2,3)} --------------------------------- The following code is a sample of use of the resource file. e.g. require 'tk' TkOption.readfile 'resource-test' p TkOption.new_proc_class(:CMD, [:foo], 1) p TkOption.new_proc_class(:XXX, [:bar], 2, false, TkOption::CMD) TkButton.new(:text=>'test').pack Tk.mainloop git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e