Commit graph

1143 commits

Author SHA1 Message Date
nobu
a70f475dbb * ext/stringio/stringio.c (strio_write): insufficiently filled string
being extended when overwriting.  [ruby-core:03836]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-29 07:06:21 +00:00
akr
2964c16f38 String::IO -> StringIO
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-27 13:33:34 +00:00
nagai
f798721334 * ext/tk/lib/tk.rb: Tk.destroy uses TkWindow#epath
* ext/tk/lib/tk/image.rb: bug fix
* ext/tk/lib/tk/wm.rb: add 'iconphoto' method(Windows only)
* ext/tk/lib/tkextlib/*: some methods uses TkWindow#epath


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-26 09:07:25 +00:00
ttate
c0b17e006c bugfix for [ruby-talk:121309].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-25 08:39:31 +00:00
ttate
bf6f327fb2 Use 'P' instead of 'p' in types.rb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-25 08:15:29 +00:00
ttate
086b1b67eb Improved encode_type() in types.rb for [ruby-talk:121175].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-24 16:41:16 +00:00
nagai
81c1375c98 * ext/tk/lib/tk/menu.rb: improve usability of TkOptionMenubutton
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-22 23:12:37 +00:00
naruse
ee44b3a1fc * original revision 1.7
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-20 04:26:03 +00:00
naruse
c4d301e4a7 * add and change mime encode/decode tests
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-19 20:52:35 +00:00
naruse
02f6ed66b7 * original nkf.c rev:1.40
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-19 20:52:01 +00:00
nobu
1fff70f8b3 * ext/stringio/stringio.c: needs fcntl.h for O_* constants.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-18 02:27:00 +00:00
nobu
61566f4b7c * io.c, rubyio.h (rb_io_modenum_flags): exported.
* ext/stringio/stringio.c (strio_initialize): allow Fixnum as mode as
  well as IO.new does.  [ruby-dev:24896]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-18 01:11:01 +00:00
nobu
549bdb3b0e * ext/stringio/stringio.c (strio_read): position was ignored when a
buffer was passed.  http://www.yo.rim.or.jp/~nov/d/?date=20041116#p03


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7281 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-16 07:21:21 +00:00
matz
fa52148571 * ext/gdbm/gdbm.c (fgdbm_store): StringValue() may alter string
pointer.  [ruby-dev:24783]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-14 16:01:45 +00:00
nagai
2b2c7c36d1 * ext/tk/lib/tk/event.rb: remove $LOADED_FEATURES trick
* ext/tk/lib/tk.rb: ditto


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-12 05:09:37 +00:00
matz
c5789b5075 * dir.c (rb_glob2): do not allocate buffer from heap to avoid
memory leaks.  use string object for buffering instead.
  [ruby-dev:24738]

* dir.c (join_path): ditto.

* io.c (io_read): external input buffer may be modified even after
  rb_str_locktmp().  [ruby-dev:24735]

* dir.c (fnmatch): p or s may be NULL.  [ruby-dev:24749]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-10 07:17:53 +00:00
nagai
6025fed91d * ext/tcltklib/tcltklib.c: fix SEGV when compiled with Tcl/Tk8.3.x or older
* ext/tk/lib/tkextlib/tile/style.rb: bug fix


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-09 18:35:52 +00:00
nagai
0be5de09a0 * ext/tk/lib/tk.rb: bind-event methods accept multi substitution arguments.
* ext/tk/lib/tk/canvas.rb: ditto.
* ext/tk/lib/tk/canvastag.rb: ditto.
* ext/tk/lib/tk/text.rb: ditto.
* ext/tk/lib/tk/texttag.rb: ditto.
* ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb: ditto.
* ext/tk/lib/tkextlib/tktable/tktable.rb: ditto.
* ext/tk/lib/tkextlib/treectrl/tktreectrl.rb: ditto


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-07 14:53:02 +00:00
nagai
b4cb871d4a * ext/tk/lib/tk/scrollable.rb: divide Scrollable module into X_Scrollable
and Y_Scrollable
* ext/tk/lib/tk/entry.rb: include X_Scrollable instead of Scrollable
* ext/tk/lib/tk/autoload.rb: define autoload for X_Scrollable and Y_Scrollable


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-05 09:15:18 +00:00
nagai
1c222a16b5 * ext/tk/lib/tk.rb: TkComm._at() supprts both of "@x,y" and "@x"
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-05 07:07:39 +00:00
nagai
dcbbe3f409 * ext/tk/lib/tk/text.rb: sorry. bug fix again.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-05 04:24:03 +00:00
nagai
05e084d7dd * ext/tk/lib/tk/text.rb: bug fix
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-05 04:19:16 +00:00
nagai
9adcea7405 * ext/tk/lib/tk/variable.rb: forget to initialize instance_variables
of TkVarAccess objects


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7198 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-04 06:03:53 +00:00
matz
d55db6b999 * gc.c (gc_mark): enable GC stack checking.
* string.c (str_gsub): lock strings temporarily.  [ruby-dev:24687]

* ext/socket/socket.c (s_recvfrom): tmplock input buffer.
  [ruby-dev:24705]

* array.c (rb_ary_uniq_bang): do not push frozen string from hash
  table.  [ruby-dev:24695]

* array.c (rb_ary_and): ditto.

* array.c (rb_ary_or): ditto.

* ext/enumerator/enumerator.c (each_cons_i): pass copy of an
  internal consequent array.  [ruby-talk:118691]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-04 01:20:51 +00:00
nagai
8ff005361a * ext/tk/lib/tk.rb: support to use different Tcl commands between
configure and configinfo
* ext/tk/lib/font.rb: ditto.
* ext/tk/lib/itemconfig.rb: support to use different Tcl commands
  between item_configure and item_configinfo
* ext/tk/lib/itemfont.rb: ditto.
* ext/tk/extconf.rb: install SUPPORT_STATUS
* ext/tk/lib/tkextlib: some bug fixes (see ext/tk/ChangeLog.tkextlib)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-03 08:09:55 +00:00
naruse
dbe30b383b * follow nkf 2.0.4
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-03 07:30:42 +00:00
eban
d271544bb6 * MANIFEST, ext/**/MANIFEST: removed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-01 10:19:37 +00:00
eban
6433a1b9e4 * ext/extmk.rb (MANIFEST): do not use anymore, use extconf.rb instead.
* ext/enumerator/extconf.rb, ext/fcntl/extconf.rb,
  ext/stringio/extconf.rb: added.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-01 08:21:06 +00:00
(no author)
8b33686b91 This commit was manufactured by cvs2svn to create branch 'ruby_1_8'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-01 08:21:06 +00:00
matz
c2a9b62fd2 * string.c (rb_str_locktmp): lock string temporarily.
* string.c (str_independent): add tmplock check.

* io.c (io_write): lock output string temporarily.
  [ruby-dev:24649]

* io.c (io_write): use rb_str_locktmp().

* io.c (read_all): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-30 15:33:03 +00:00
suke
ffce014b7b some typo fixed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-30 01:05:08 +00:00
akira
121648473d * ext/zlib/zlib.c (zstream_detach_input): resets klass of z->input if
z->input isn't nil.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-28 14:40:08 +00:00
nobu
1f11d86110 * ext/extmk.rb: prefer relative path. [ruby-talk:93037]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-28 14:19:40 +00:00
matz
ece87af00c * string.c (RESIZE_CAPA): check string attribute before modifying
capacity member of string structure.  [ruby-dev:24594]

* ext/zlib/zlib.c (gzreader_gets): use memchr() to to gain
  performance.  [ruby-talk:117701]

* sprintf.c (rb_f_sprintf): raise ArgumentError for extra
  arguments, unless (digit)$ style used.

* ext/zlib/zlib.c (gzreader_gets): use memchr() to to gain
  performance.  [ruby-talk:117701]

* sprintf.c (rb_f_sprintf): raise ArgumentError for extra
  arguments, unless (digit)$ style used.

* eval.c (frame_free): Guy Decoux solved the leak problem.
  Thanks.  [ruby-core:03549]

* ext/zlib/zlib.c (zstream_append_input): clear klass for z->input
  to avoid potential vulnerability.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-27 02:46:54 +00:00
nagai
2c38cb5fb0 * ext/tk/sample/tkextlib/bwidget/tree.rb: bug fix
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-24 13:13:12 +00:00
ttate
672e5b5c87 Use NUM2INT to convert short values.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-23 06:05:15 +00:00
matz
6dea159d03 * ext/zlib/zlib.c (zstream_shift_buffer): should restore class
field of a buffer.  [ruby-dev:24562]

* eval.c (rb_alias): should warn on method discarding.
  [ruby-dev:24546]

* ext/zlib/zlib.c (zstream_expand_buffer_into): hide internal
  string buffer by clearing klass.  [ruby-dev:24548]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-21 15:27:25 +00:00
matz
2ec51ee0d5 * string.c (str_gsub): reentrant check. [ruby-dev:24432]
* backport all SEGV bug fixes from CVS HEAD.  [ruby-dev:24536]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-20 12:47:20 +00:00
(no author)
8b99fb60a5 This commit was manufactured by cvs2svn to create branch 'ruby_1_8'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-19 19:25:59 +00:00
suke
cfa37a9def * ext/win32ole.c(ole_invoke): retrieve the result value when
retrying the IDispatch::invoke.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-19 11:40:33 +00:00
matz
860bdc3b61 * io.c (read_all): block string buffer modification during
rb_io_fread() by freezing it temporarily. [ruby-dev:24479]

* dir.c (rb_push_glob): block call at once the end of method.
  [ruby-dev:24487]

* ext/enumerator/enumerator.c (enum_each_slice): remove
  rb_gc_force_recycle() to prevent potential SEGV.
  [ruby-dev:24499]

* ext/zlib/zlib.c (zstream_expand_buffer): hide internal string
  buffer by clearing klass.  [ruby-dev:24510]

* ext/socket/socket.c (sock_s_getservbyaname): protocol string
  might be altered.  [ruby-dev:24503]

* string.c (rb_str_upto): check if return value from succ is a
  string.  [ruby-dev:24504]

* io.c (rb_io_popen): get mode string via rb_io_flags_mode() to
  avoid mode string modification.  [ruby-dev:24454]

* io.c (rb_io_getline_fast): should take delim as unsigned char to
  distinguish EOF and '\377'.  [ruby-dev:24460]

* io.c (rb_io_getline): add check for RS modification.
  [ruby-dev:24461]

* enum.c (enum_sort_by): use qsort() directly instead using
  rb_iterate().  [ruby-dev:24462]

* enum.c (enum_each_with_index): remove rb_gc_force_recycle() to
  prevent access to recycled object (via continuation for
  example).  [ruby-dev:24463]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-19 10:25:23 +00:00
nagai
dd09dfe3f0 * ext/tk/tkutil.c: backport from CVS HEAD
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-19 07:13:28 +00:00
eban
f4e88fb23a * ext/tk/MANIFEST: add lib/tkextlib/tcllib/ico.rb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-18 02:40:13 +00:00
nagai
51043a36b4 * ext/tk/lib/tk/timer.rb: TkTimer#start and restart accept a block
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-17 14:05:19 +00:00
suke
1f895ea893 * ext/win32ole/win32ole.c (fole_func_methods): correct argument mismatch.
* ext/win32ole/win32ole.c (fole_get_methods): ditto.
	* ext/win32ole/win32ole.c (fole_put_methods): ditto.
	* ext/win32ole/tests/testWIN32OLE.rb: add test for WIN32OLE#ole_func_methods
	  WIN32OLE#ole_get_methods, WIN32OLE#ole_put_methods


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-17 04:02:16 +00:00
nagai
a7ceaf9235 * ext/tk/lib/tkextlib/tcllib: based on Tcllib 1.7
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-16 02:13:54 +00:00
nagai
c00d928b3e * ext/tk/lib/tk/timer.rb: TkTimer.new(interval, loop){ ... } is acceptable.
Add TkTimer.start ( == new + start ).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-15 09:06:52 +00:00
nagai
94d960beb5 * ext/tk/lib/tk/*: untabify
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-11 04:51:21 +00:00
nagai
e6b852a2fa * ext/tk/lib/tk/optiondb.rb: make it more secure
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-07 16:14:29 +00:00
nagai
ecc7210323 * ext/tk/lib/tk/scrollbar.rb: When 'set' operation, a scrollbar cannot
propagate view port information from the source widget (that calls
  'set') to other assigned widgets.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-07 14:50:59 +00:00