Commit graph

1664 commits

Author SHA1 Message Date
knu
c31e487592 * ext/thread/thread.c: Handle interrupted waits correctly.
[ruby-bugs:PR#8663]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-15 01:57:03 +00:00
knu
97b6683a28 * ext/digest/lib/digest.rb (Digest::self.const_missing): Drop
autoloads for sha2 classes in favor of handling in
  const_missing(), to work around a problem exposed on OS X.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-14 12:46:56 +00:00
knu
02db1bdf77 * configure.in, ext/thread/extconf.rb, lib/thread.rb: Add a
configure option `--disable-fastthread', to choose the original,
  pure ruby version of the "thread" library instead of the new,
  much faster implementation in ext/thread.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-10 21:41:26 +00:00
knu
78128f5e85 * ext/Setup: Add thread except for platforms without threads
support.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-10 21:24:58 +00:00
knu
e8b3e1af53 * ext/thread/lib/thread.rb: Add a replacement of thread.rb that
loads this extension.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-10 21:18:24 +00:00
knu
2a7ec27be2 * ext/thread/thread.c (rb_thread_exclusive): Implement
Thread.exclusive.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-10 20:33:50 +00:00
knu
f9c378051a * ext/thread/thread.c: Get rid of use of a dummy function.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-10 20:27:58 +00:00
knu
e366c36b6b * ext/thread/thread.c (Init_thread): Define missing aliases:
Queue#enq and SizedQueue#enq.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-10 16:48:02 +00:00
suke
ffddf9349f * ext/win32ole/win32ole.c (ole_variant2val): fix compile error
on VC++.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-10 00:05:42 +00:00
suke
c8359821a0 * ext/win32ole/win32ole.c (ole_variant2val): fix the bug when
SAFEARRAY pointer is NULL.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-09 22:41:09 +00:00
nagai
a06de8b901 * ext/tk/lib/tk.rb: fix typo (TkConfigMethod::__confinfo_cmd,
__conv_keyonly_opts).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-09 15:30:59 +00:00
knu
b28988b4f1 * ext/thread: Make style fixes (mostly de-K&R'ism) to match the
rest of the source code.

* ext/thread: Make USE_MEM_POOLS an extconf option.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-09 11:48:34 +00:00
knu
fff0db9dfe Oops, this is the original form. I committed the wrong file.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-09 11:44:11 +00:00
knu
60047f3822 * ext/thread: Import the "fastthread" implementation by MenTaLguY
in the original form.  This module is not hooked into the build
  yet since it needs some style fixes and adjustments.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-09 11:41:49 +00:00
knu
179eb27889 * ext/bigdecimal: Synchronize with trunk. Better function
prototypes, removal of a useless method `!=', and document
  updates.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-09 06:48:51 +00:00
naruse
b2515d3003 Tue Feb 06 22:06:45 2007 NARUSE, Yui <naruse@ruby-lang.org>
* ext/nkf/nkf-utf8/{nkf.c,utf8tbl.c}:
          imported nkf 2007-01-28.
          * Fixed: can't decode MIME encode JIS string.
          * Fixed: Fullwitdh-halfwidth conversion.
          * Support DoCoMo's and Softbank's EMOJI
          * Support CP932, CP5022x, eucJP-ms UDC
          * Support UTF-32 encoding
          * Support beyond BMP
          [ruby-dev:29700] [ruby-dev:29922] [ruby-dev:30144]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-06 13:35:50 +00:00
nagai
8e7d740383 * ext/tk/sample/images/teapot.ppm: fix the broken file. [ruby-dev:30226]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-31 05:37:54 +00:00
nagai
4d0ec108af * ext/tk/sample/tktextio.rb: 'hist_size' option causes error.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-29 19:56:48 +00:00
nagai
eac39d7c02 * ext/tk/lib/tk.rb (TkConfigMethod#__confinfo_cmd,__conv_keyonly_optkeys):
make them private [ruby-dev:30074].
* ext/tk/lib/tk/txtwin_abst.rb: fix typo [ruby-dev:30073].
* ext/tk/lib/tk/canvas.rb (TkCanvas#scan_dragto): lack of an argument.
* ext/tk/lib/tk/canvas.rb: clarify the  including module name [ruby-dev:30080].
* ext/tk/lib/tk/scrollable.rb: change primary name of modules [ruby-dev:30080].
* ext/tk/lib/tkextlib/iwidgets/checkbox.rb: wrong number of arguments 
  [ruby-Bugs-7776].
* ext/tk/lib/tkextlib/iwidgets/radiobox.rb: ditto.
* ext/tk/lib/tkextlib/blt/tile/checkbutton.rb: change primary name of
  class [ruby-dev:30080].
* ext/tk/lib/tkextlib/blt/tile/radiobutton.rb: ditto.
* ext/tk/ChangeLog.tkextlib: update.
* ext/tk/lib/tkextlib/version.rb: update.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-26 03:18:23 +00:00
matz
e12e30710f * ext/socket/socket.c: fix errors in socket sample code.
[ruby-core:09992]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-23 01:27:31 +00:00
suke
abf36b65d0 remove including header file
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-13 22:08:53 +00:00
suke
6f910a6fa1 fix memory leak of win32ole.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-13 14:59:17 +00:00
knu
81246910f2 * ext/etc/etc.c (etc_getpwuid, etc_getgrgid): fix to correctly
convert uid/gid from VALUE. (backport of r11521)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-12 02:27:43 +00:00
aamine
2785c7c05f * ext/strscan/strscan.c (strscan_do_scan): should set kcode option before match. [ruby-dev:29914]
* test/strscan/test_stringscanner.rb: test it.
* re.c: export kcode_set_option and kcode_reset_option (with "rb_" prefix).
* intern.h: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-10 09:59:11 +00:00
matz
46fa18da5b Revert r11453
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-03 03:14:57 +00:00
matz
4ee717dcae * io.c (ruby_dup): start GC on ENOMEM as well.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-03 02:51:44 +00:00
drbrain
a0c3379cb9 Merge 11443, 11444 and 11445 from trunk.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-12-31 21:38:52 +00:00
matz
df9517ba0d * ext/readline/readline.c: NetBSD editline does not have
rl_username_completion_function() and rl_completion_matches().
  a patch from Takahiro Kambe <taca at back-street.net>.
  [ruby-dev:30008]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-12-14 09:34:47 +00:00
(no author)
bdb52f5c19 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@11378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-12-11 02:59:43 +00:00
knu
a635bef8f1 * ext/digest/sha2/lib/sha2.rb: Moved one level up from under
the superfluous subdirectory digest/.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-12-11 02:59:43 +00:00
gotoyuzo
228e8f2434 * ext/openssl/ossl_ocsp.c: OpenSSL::OCSP::OSCPError should be
subclass of OpenSSL::OpenSSLError. [ruby-dev:29980]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11320 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-12-01 22:11:51 +00:00
nagai
26474005b0 * ext/tk/tcltklib.c: shouldn't run the killed thread at callback.
[ruby-talk: 227408]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-12-01 07:43:05 +00:00
nagai
8faf08a4e1 * ext/tk/extconf.rb: support --with-X11/--without-X11 option.
* ext/tk/README.tcltklib: add description about --with-X11-* option
  [ruby-talk:225166] and --with-X11/--without-X11 option.
* ext/tk/tkutil/extconf.rb: able to be called manually [ruby-talk:225950].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-11-22 07:06:11 +00:00
knu
994d558247 * ext/digest/lib/digest/hmac.rb: Keep this out of the 1.8 tree
until we reach a consensus that HMAC should be put under Digest.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-11-07 09:37:35 +00:00
nagai
b287873344 * ext/tk/lib/tk/itemconfig.rb: minor bug fix.
* ext/tk/lib/tkextlib/tile/treeview.rb : ditto.
* ext/tk/lib/tkextlib/blt/table.rb: fix bugs which forbade use of
  '::blt::table' command. Now, probably, it'll works properly.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-11-07 09:11:38 +00:00
nagai
1d82954444 * ext/tk/lib/tk/itemconfig.rb: bug fix on 'itemconfiginfo' method, and
modify to make it easy to override 'itemconfiginfo' method.
* ext/tk/lib/tkextlib/tile/treeview.rb : support Tile 0.7.8.
* ext/tk/lib/tkextlib/version.rb : [new] add Tk::Tkextlib_RELEASE_DATE
  to get the information from scripts.
* ext/tk/lib/tk.rb: load 'tkextlib/version.rb', and update RELEASE_DATE.
* ext/tk/lib/tkextlib/SUPPORT_STATUS: update.
* ext/tk/sample/editable_listbox.rb: [new] the listbox with editable
  items. It's one of the example about usage of Place geometry manager.
* ext/tk/sample/tktextio.rb: improve the functions of TkTextIO class.
  Those are required by 'irbtkw.rbw'.
* ext/tk/sample/irbtkw.rbw: [new] IRB on Ruby/Tk. It doesn't need any
  real console. IRB works on a text widget without I/O blocking. That
  is, thread switching on IRB will work properly, even if on Windows.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-11-06 06:56:37 +00:00
matz
89e7d586f4 * ext/socket/socket.c (ruby_getnameinfo__aix): AF_INET6 workaround
for AIX.  a patch from Yutaka Kanemoto <kinpoco AT gmail.com>.
  [ruby-dev:29744]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-11-02 15:23:08 +00:00
knu
d26d618159 * ext/digest/lib/digest/hmac.rb (Digest::HMAC::update): Minor
optimization.

* ext/digest/digest.c (rb_digest_instance_equal): Allow comparing
  a digest instance with another of a different class.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-11-01 05:01:43 +00:00
gotoyuzo
aa1160ada8 * ext/openssl/ossl_pkcs7.c (ossl_pkcs7_verify): should clear error.
(fix http://bugs.debian.org/394336)

* ext/openssl/ossl_ns_spki.c (ossl_spki_initialize): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-26 12:06:39 +00:00
usa
6ed0a10eeb * ext/digest/digest.c (Init_digest): typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-26 06:22:21 +00:00
knu
817afbd987 * ext/digest, test/digest/test_digest.rb: Merge from trunk:
- Introduce versioning in Digest::Base API, and prefix C
    constants with RUBY_ and C type names with rb_ to avoid name
    clash in writing extensions.
  - Introduce Digest::Class and Digest::Instance for ease of
    implementing subclasses and add-ons.
  - Digest::Instance module requires and assumes that any instance
    be resettable and clonable.  An instance method #new() is
    added so digest instances work just like digest classes.
  - The constructor does no longer take an initial string to feed;
    digest() and hexdigest() now do, instead.  This allows digest
    classes to take their own hashing parameters.
  - Make some changes to digest() and hexdigest() class methods,
    which now take extra arguments, which are passed through to
    the constructor in an internal call.
  - Add #digest_length/size/length() and #block_length(),
  - Add the Digest::SHA2 class to wrap up SHA2 variants: SHA256,
    SHA384 and SHA512, hoping this module would make a decent
    example of a digest subclass written in Ruby.
  - Rip BubbleBabble support out of the base class and have a
    separate module named digest/bubblebabble.
  - Remove RD documents in favor of newly written and embedded
    RDoc documentation.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-25 08:54:05 +00:00
(no author)
0bdf887afc 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@11222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-25 08:54:05 +00:00
nobu
19310ddc6e * ext/extmk.rb: Borland make needs also -D flags to override variables
in Makefile.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-19 16:03:45 +00:00
nobu
23575b58ba * bcc32/Makefile.sub ($(LIBRUBY_SO)): execute pre-link hook.
* ext/extmk.rb: workaround for Borland make.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-19 15:38:31 +00:00
matz
f172c27683 * parse.y (parser_warning, parser_warn): some error message may
contain format specifiers.  a patch from Akinori MUSHA <knu at
  iDaemons.org>.  [ruby-dev:29657]

* ext/bigdecimal/bigdecimal.c (VpException): ditto.

* ext/dl/handle.c (rb_dlhandle_initialize): ditto.

* ext/gdbm/gdbm.c (rb_gdbm_fatal): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-14 14:34:07 +00:00
knu
8a3f596ff2 * ext/digest/lib/digest/hmac: Back out the addition of digest/hmac
for now because the API is too premature for a stable branch.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-13 23:31:45 +00:00
knu
368c8038f4 * ext/digest: Merge from trunk; metadata location changed,
Digest::Base#reset() added, Digest::Base#equal() changed, and
  digest/hmac added with some modifications for ruby 1.8.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-11 17:25:45 +00:00
(no author)
b3f7970ef9 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@11136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-11 17:25:45 +00:00
knu
71bf4e6372 * ext/digest/digest.c (hexdigest_str_new, bubblebabble_str_new):
Perform StringValue() checks properly.

* ext/digest/digest.c: Use RSTRING_{PTR,LEN} macros.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-10 07:53:50 +00:00
knu
9b2fa26be4 * ext/digest: Merge from trunk; apply all changes since the
initial import, except for the removal of compatibility stub
  libraries (md5.rb and sha1.rb).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-10 05:01:33 +00:00