Граф коммитов

144 Коммитов

Автор SHA1 Сообщение Дата
knu bf8cd1e929 * ext/digest/digest.c: Improve RDoc documentation.
* ext/digest/digest.c (Init_digest, rb_digest_base_s_digest,
  rb_digest_base_s_hexdigest): Make Digest::Base::digest() and
  Digest::Base::hexdigest() take extra arguments, which are passed
  through to the constructor in an internal call.

* ext/digest/bubblebabble/bubblebabble.c
  (rb_digest_base_s_bubblebabble): Ditto for
  Digest::Base::bubblebabble().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11164 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-13 19:40:01 +00:00
knu 703d2d1612 Add .cvsignore
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-13 19:08:11 +00:00
knu 3a4ce48c75 * ext/digest/lib/digest.rb (Digest): Try to auto-load non-standard
digest modules when a specified digest class is missing.

* ext/digest/lib/digest.rb: Define Digest(name) for ease of
  dynamically selecting a hashing algorithm.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-13 12:02:32 +00:00
knu f678390e1f * ext/digest/digest.c (Init_digest): Digest::Base.new() does no
longer take an initial string to feed.  This change allows
  subclasses to take hashing parameters.  A statement such as
  ``md = Digest::MD5.new(s)'' can be easily rewritten as
  ``md = Digest::MD5.new << s'' or
  ``md = Digest::MD5.new.update(s)''.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-13 11:58:05 +00:00
knu 5cafaa6744 * ext/digest/digest.c, ext/digest/md5/md5init.c,
ext/digest/rmd160/rmd160init.c, ext/digest/sha1/sha1init.c,
  ext/digest/sha2/sha2init.c: Add RDoc documentation.

* ext/digest/digest.txt, ext/digest/digest.txt.ja: Removed in
  favor of embedded RDoc documentation.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-13 11:52:18 +00:00
knu 2125aafc27 * ext/digest/bubblebabble, ext/digest/digest.c: Rip BubbleBabble
support out of the base class and have a separate module named
  digest/bubblebabble.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-13 11:46:03 +00:00
knu b9dea008c7 * ext/digest/digest.c (rb_digest_base_equal): Again, should call
digest() of a subclass instead of the one defined in the base
  class.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-13 10:55:51 +00:00
knu 53b4c90110 * ext/digest/digest.c (rb_digest_base_equal): Should call digest()
of a subclass instead of the one defined in the base class.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-12 17:43:17 +00:00
knu 2391385060 * ext/digest/lib/digest/hmac.rb: Make use of String#bytes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-11 17:16:27 +00:00
knu 9b81e26df2 * ext/digest/digest.c (get_digest_base_metadata): Use an instance
variable of a class object instead of a class variable for
  metadata.  This change is crucial for ruby 1.8 and applying it
  also to the trunk will assure compatibilities.

* ext/digest/md5/md5init.c (Init_md5): Ditto.

* ext/digest/rmd160/rmd160init.c (Init_rmd160): Ditto.

* ext/digest/sha1/sha1init.c (Init_sha1): Ditto.

* ext/digest/sha2/sha2init.c (Init_sha2): Ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-11 17:14:54 +00:00
knu 945a76d97b * ext/digest/digest.c (rb_digest_base_alloc,
rb_digest_base_equal): Simplify the equality check and just
  compare resulted digests since state-level equality should
  not be significant.

* ext/digest/digest.h: Ditto.

* ext/digest/*/*.[ch]: Ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-11 12:43:58 +00:00
knu 02d76d0387 * ext/digest/lib/digest/hmac.rb: Add digest/hmac, which implements
HMAC keyed-hashing algorithm.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-11 07:00:29 +00:00
knu 8eb7570850 * ext/digest/digest.c (rb_digest_base_reset): Do not make
recursive calls, but call initialize() when reset() is not
  defined in a subclass.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-11 06:05:32 +00:00
matz fedfa6e5fa * ext/digest/sha1/sha1ossl.h: libssl 0.9.8c-3 defines no
SHA_BLOCK_LENGTH.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-11 05:57:19 +00:00
knu cd58f3313e * ext/digest/digest.c (rb_digest_base_reset, Init_digest): Add
Digest::Base#reset.

* ext/digest/digest.h: Update the header comment.

* ext/digest/md5/md5ossl.h, ext/digest/md5/md5init.c (Init_md5):
  Define DIGEST_LENGTH and BLOCK_LENGTH.

* ext/digest/rmd160/rmd160init.c (Init_rmd160): Ditto.

* ext/digest/sha1/sha1init.c (Init_sha1): Ditto.

* ext/digest/sha2/sha2init.c (Init_sha2): Ditto.

* ext/digest/depend, ext/digest/extconf.rb: Use $INSTALLFILES
  rather than adding make targets. [Pointed out by: nobu]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-11 05:15:15 +00:00
knu 775e54fe7b * ext/digest/digest.c (hexdigest_str_new, bubblebabble_str_new):
Perform StringValue() checks properly.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-10 07:49:00 +00:00
knu f7579abcec * ext/digest/sha1/depend, ext/digest/sha2/depend: Remove obsolete
dependencies.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-10 04:22:30 +00:00
knu 0522cf503c * ext/digest/depend: Fix header installation when the build
directory is different from srcdir. [Pointed out by: eban]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-06 06:22:56 +00:00
knu 8d6db94ec7 * ext/digest/depend: Install digest.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-05 19:48:11 +00:00
knu ed6886efb5 * ext/digest/lib/md5.rb, ext/digest/lib/sha1.rb: Remove those
compatibility stub libraries.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-05 19:25:31 +00:00
knu 60f63ff93d * ext/digest/digest.c: Make hexdigest() always call digest() internally.
* ext/digest/digest.c: Add bubblebabble().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-05 19:13:00 +00:00
knu 0ad60d4f28 * ext/digest/digest.c: Allow subclassing in Ruby.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-05 17:39:51 +00:00
knu 8d0e66afdf * ext/digest/digest.c (hexdigest_str_new): Add a string size check.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-05 17:07:59 +00:00
knu b9673f64f1 * ext/digest/digest.[ch]: Since the argument order of
hash_final_func_t was inconsistent with others, change it and
  rename to hash_finish_func_t to avoid confusion.

* ext/digest/digest.[ch]: Remove and eliminate the use of
  hash_end_func_t.  Implement hexdigest conversion in the base
  class.

* ext/digest/md5/md5.c, ext/digest/md5/md5.h,
  ext/digest/md5/md5init.c, ext/digest/md5/md5ossl.c,
  ext/digest/md5/md5ossl.h: Remove MD5_End() and change
  MD5_Final() to MD5_Finish().

* ext/digest/rmd160/depend, ext/digest/rmd160/extconf.rb,
  ext/digest/rmd160/rmd160.c, ext/digest/rmd160/rmd160.h,
  ext/digest/rmd160/rmd160hl.c, ext/digest/rmd160/rmd160init.c,
  ext/digest/rmd160/rmd160ossl.c, ext/digest/rmd160/rmd160ossl.h:
  Remove unused functions RMD160_End(), RMD160_File(),
  RMD160_Data() and change RMD160_Final() to RMD160_Finish().

* ext/digest/sha1/extconf.rb, ext/digest/sha1/sha1.c,
  ext/digest/sha1/sha1.h, ext/digest/sha1/sha1hl.c,
  ext/digest/sha1/sha1init.c, ext/digest/sha1/sha1ossl.c,
  ext/digest/sha1/sha1ossl.h: Likewise.

* ext/digest/sha2/extconf.rb, ext/digest/sha2/sha2.c,
  ext/digest/sha2/sha2.h, ext/digest/sha2/sha2hl.c,
  ext/digest/sha2/sha2init.c: Likewise.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-05 11:09:42 +00:00
knu 480496a806 * ext/digest/lib/digest.rb (Digest): Require digest.so and fix the
breakage.  Point out by NAKAMURA Usaku in [ruby-dev:29619].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-29 04:21:30 +00:00
knu 3c29f3feef * ext/digest/md5/md5init.c (Init_md5): Now that we have digest.rb,
require "digest" rather than "digest.so".

* ext/digest/rmd160/rmd160init.c (Init_rmd160): Ditto.

* ext/digest/sha1/sha1init.c (Init_sha1): Ditto.

* ext/digest/sha2/sha2init.c (Init_sha2): Ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-27 14:34:49 +00:00
akr 2043c39808 * ext/digest/lib/digest.rb (Digest::Base.file): open a file in binary
mode.  suggested by Kazuhiro NISHIYAMA.  [ruby-dev:29579]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-14 15:05:22 +00:00
akr 803cabaced add a document for Digest::Base.file.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-14 06:21:56 +00:00
akr d6ff7b526a * ext/digest/lib/digest.rb (Digest::Base.file): new method.
[ruby-dev:29572]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-14 05:39:40 +00:00
akr be02cb10f8 * ext/digest/digest.c (rb_digest_base_inspect): new method.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-13 23:32:12 +00:00
akr 3d9fc0d7d0 * ext/digest/lib/digest.rb: new file.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-13 16:03:23 +00:00
matz 25c50cd193 * ruby.h (struct RString): embed small strings.
(RSTRING_LEN): defined for accessing string members.
  (RSTRING_PTR): ditto.

* string.c: use RSTRING_LEN and RSTRING_PTR.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-31 10:30:33 +00:00
drbrain cfdb83349e Make RDoc show up.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-28 02:31:58 +00:00
drbrain 6e83a71d3b Include attribution
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-27 23:03:20 +00:00
matz 1293d0dbc6 * ext/bigdecimal/bigdecimal.c, ext/digest/rmd160/rmd160ossl.c,
ext/digest/sha1/sha1ossl.c, ext/readline/readline.c: move
  incluion of config.h to pacify AIX.  a patch from Yutaka
  Kanemoto <kinpoco at gmail.com>.  [ruby-dev:29197]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-07 09:01:27 +00:00
akr 934847fbeb add extconf.h to .cvsignore.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-24 01:15:08 +00:00
nobu e34b2a73e6 * ruby.h, lib/mkmf.rb (create_header): clear command line options for
macros moved to extconf.h.

* ext/extmk.rb (extract_makefile, extmk): made RUBY_EXTCONF_H and
  EXTSTATIC permanent.

* ext/{dbm,digest/*,socket,zlib}/extconf.rb: used $defs and $INCFLAGS.

* {bcc32,win32,wince}/Makefile.sub (COMPILE_C, COMPILE_CXX): added
  $(INCFLAGS).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-05-25 23:44:08 +00:00
matz de3bff164c * eval.c (rb_mod_define_method): should save safe_level in the
proc object.  [ruby-dev:28146]

* test/drb/drbtest.rb (DRbService::self.ext_service): increase
  timeout limit.  a patch from Kazuhiro NISHIYAMA
  <zn at mbf.nifty.com>. [ruby-dev:28132]

* eval.c (ev_const_get): fixed a bug in constant reference during
  instance_eval.  [yarv-dev:707]

* eval.c (ev_const_defined): ditto.

* lib/yaml.rb (YAML::add_domain_type): typo fixed.  a patch from
  Joel VanderWerf <vjoel at path.berkeley.edu>.
  [ruby-talk:165285] [ruby-core:6995]

* ext/digest/sha2/sha2.c (ULL): support AIX C.  a patch from
  Kailden <kailden at gmail.com>.  [ruby-core:06984]

* ext/syck/rubyext.c (rb_syck_compile): avoid potential memory
  leak.

* ext/syck/rubyext.c (syck_set_ivars): avoid potential memory
  leak by explicit symbol allocation.

* lib/delegate.rb (Delegator::method_missing): should delegate
  block as well.

* lib/cgi.rb (CGI::QueryExtension::MorphingBody): fix criteria to
  use Tempfile.  A fix from Zev Blut <rubyzbibd at ubit.com>.
  [ruby-core:06076]

* string.c: remove global functions work on $_.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-12-29 12:05:16 +00:00
akr 0158c70645 remove unused variables.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-12-12 05:15:33 +00:00
matz 4d467a0865 * ext/digest/digest.c (rb_digest_base_s_digest): add volatile to
protect temporary context object.  [ruby-dev:27979]

* ext/iconv/iconv.c (Init_iconv): rb_gc_register_address() should
  be called before actual variable initialization.
  [ruby-dev:27986]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-12-12 00:36:54 +00:00
nobu f6892cba23 * Makefile.in, configure.in (MINIOBJS): miniruby on HP-UX can not load
extension libraries.

* bignum.c (bignew_1, bigadd): K&R style argument actually can't be
  defined as char.

* missing/vsnprintf.c: ANSI compiler supports const keyword.

* ext/digest/sha2/extconf.rb: reject platforms which has inttypes.h
  but no 64bit integer.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-06 23:23:04 +00:00
gotoyuzo 3b18462de7 * ext/digest/md5/md5ossl.h, ext/digest/rmd160/rmd160ossl.h,
ext/digest/sha1/sha1ossl.h: include <stddef.h> to avoid
  error in compilation with OpenSSL-0.9.8. [ruby-list:41068]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-30 10:43:36 +00:00
eban 49fb289ea1 * MANIFEST, ext/**/MANIFEST: removed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-01 10:13:52 +00:00
matz e77ddaf0d1 * array.c (rb_ary_delete): element comparison might change array
size. [ruby-dev:24273]

* parse.y: make ruby parser reentrant. merge ripper parser to the
  real one.  this change makes ruby require bison.

* file.c (rb_file_truncate): clear stdio buffer before truncating
  the file.  [ruby-dev:24191]

* ext/digest/digest.c: use rb_obj_class() instead of CLASS_OF
  which might return singleton class.  [ruby-dev:24202]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-09-17 09:24:13 +00:00
nobu e10564a578 * lib/mkmf.rb (init_mkmf): $INCFLAGS also should be lazy-evaluated.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-02-22 05:58:10 +00:00
nobu 58145e6d93 * ext/digest/md5/extconf.rb: have_library appends found library.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-21 09:05:28 +00:00
nobu ce164c2a30 * ext/digest/rmd160/extconf.rb: have_library appends found library.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-21 07:01:43 +00:00
nobu 224021104d * ext/digest/defs.h, win32/win3.c, win32/win32.h, file.c: remove
useless casts for Borland C.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-19 12:28:14 +00:00
nobu 44e22e8d78 * ext/extmk.rb: preserve order in Setup. [ruby-dev:22503]
* ext/extmk.rb: move dependent libraries just after depended
  libraries.

* ext/digest/*/extconf.rb: depend on digest.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-07 22:06:38 +00:00
nobu 0f54ad5f6c * sample/optparse/opttest.rb: added.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-01 08:14:38 +00:00
knu c1b6f966be Add a XXX comment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-15 13:50:51 +00:00
usa 0ac52b49f4 * ext/digest/digest.c (rb_digest_base_alloc): need to initialize
buffer. [ruby-dev:21622]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-15 04:19:48 +00:00
knu 6d9c20d6a3 * test/digest/test_digest.rb: Moved from ext/digest/test.rb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-14 19:34:46 +00:00
matz 4699b4afbb * eval.c (rb_thread_atfork): wrong format specifier.
[ruby-dev:21428]

* process.c (pst_inspect): better description.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-29 02:44:49 +00:00
nobu 94d17c1f1f * ext/extmk.rb (extmake): pass LIBPATH to make ruby. [ruby-dev:21137]
* ext/extmk.rb (extmake): set library name as source file name in
  Init_ext().  [ruby-dev:21137]

* lib/mkmf.rb (Logging::postpone): postpone logging messages after
  heading message as the result of the block.

* lib/mkmf.rb (macro_defined?): append newline to src unless ended
  with it.

* lib/mkmf.rb (have_library): allow nil function name to just
  append a library.  (ruby-bugs:PR#1083)

* lib/mkmf.rb (pkg_config): should append additional libraries to
  $libs but not $LIBS.  [ruby-dev:21137]

* ext/io/wait/extconf.rb: check DOSISH macro instead of platform.

* ext/digest/sha1/extconf.rb: have_library already appends library
  name.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-06 03:11:14 +00:00
matz f0b77b0cde * ext/tk/lib/tk.rb (TkCore::chooseDirectory): back up wrongly
removed method.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-26 15:03:16 +00:00
eban 4893c5cce1 * ext/digest/defs.h: better support for old Cygwin, again.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-01 15:39:52 +00:00
eban e7bcd2ee33 * ext/digest/defs.h: better support for old Cygwin.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-01 15:27:09 +00:00
eban 9b616a5e85 * ext/digest/defs.h: avoid warnings on Cygwin.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-01 14:20:58 +00:00
matz f595d5b0d2 * array.c (rb_ary_values_at): new method to replace select(index..).
* hash.c (rb_hash_values_at,env_values_at): ditto.

* re.c (match_values_at): ditto.

* struct.c (rb_struct_values_at): ditto.

* re.c (match_select): add iterator behavior.
	* ext/curses/curses.c, ext/digest/sha2/sha2.c, ext/iconv/iconv.c,
	  ext/racc/cparse/cparse.c: include "ruby.h" at the top to shut up
	  "_FILE_OFFSET_BITS redefined" warning on Solaris.

* class.c (rb_class_protected_instance_methods): now gives
  warnings to show migration path.  The default will be reversed
  on Jan 2004.

* numeric.c (num_step): "1.1.step(1.5,0.1)" to work.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-04 16:03:24 +00:00
knu 8eba058079 * intern.h (rb_check_array_type): Declare rb_check_array_type().
* ext/digest/md5/md5ossl.c: Include stdio.h for sprintf() and
  string.h for memcmp().

* ext/dl/ptr.c: Include ctype.h for isdigit().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3302 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-06 11:47:53 +00:00
usa b469f3155a * array.c (ary_alloc), dir.c (dir_s_alloc), eval.c (thgroup_s_alloc),
file.c (rb_stat_s_alloc), hash.c (hash_alloc), io.c (io_alloc),
  object.c (rb_module_s_alloc, rb_class_allocate_instance),
  re.c (match_alloc, rb_reg_s_alloc), string.c (str_alloc),
  time.c (time_s_alloc), ext/digest/digest.c (rb_digest_base_alloc),
  ext/tcltklib/tcltklib.c (ip_alloc),
  ext/win32ole/win32ole.c (fole_s_allocate, fev_s_allocate)
  : add prototype to get rid of VC++ warnings.

* ext/sdbm/init.c (fsdbm_alloc): allocator takes only one argument.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-21 18:02:01 +00:00
nobu 3780ede6ef * ext/curses/curses.c, ext/digest/digest.c, ext/dl/handle.c,
ext/dl/ptr.c, ext/dl/sym.c, ext/gdbm/gdbm.c, ext/iconv/iconv.c,
  ext/stringio/stringio.c, ext/strscan/strscan.c,
  ext/tcltklib/tcltklib.c, ext/win32ole/win32ole.c:
  use rb_define_alloc_func().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-20 11:23:40 +00:00
nobu 1b19c063b8 * ext/digest/digest.c (rb_digest_base_copy): renamed "become".
* ext/stringio/stringio.c (strio_copy): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-11 02:31:59 +00:00
knu ce0fd8c523 * ext/digest/test.rb: Switch from RUnit to Test::Unit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-27 07:28:45 +00:00
knu 5c57a96f81 Update the MANIFEST files.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-27 13:21:19 +00:00
knu 35e4d1319b Add a knob WITH_BUNDLED_ENGINES to test.sh.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-26 17:55:16 +00:00
knu 7a6adb8924 * ext/digest/sha1: Use OpenSSL's SHA1 engine if available. It is
much faster than what we have now (sha1.[ch]).  Add a knob
  (--with-bundled-sha1) to extconf.rb which makes it use the
  bundled one anyway.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-26 17:44:33 +00:00
knu 15d643f44c * ext/digest/rmd160: Use OpenSSL's RMD160 engine if available. It
is much faster than what we have now (rmd160.[ch]).  Add a knob
  (--with-bundled-rmd160) to extconf.rb which makes it use the
  bundled one anyway.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-26 17:26:46 +00:00
knu 965393cbb8 * ext/digest/md5: Use OpenSSL's MD5 engine if available. It is
much faster than what we have now (md5.[ch]).  Add a knob
  (--with-bundled-md5) to extconf.rb which makes it use the
  bundled one anyway.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-26 16:27:23 +00:00
knu b00af5f83a * ext/digest/digest.c (rb_digest_base_s_digest): Fix a double
free() bug mingled with allocation framework deployment.

* ext/digest/digest.c (rb_digest_base_s_hexdigest): Get rid of
  redundant struct allocation.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-26 13:49:40 +00:00
eban 4f26f3b890 * configure.in: modify program_prefix only if specified
--program-prefix.

* configure.in: don't generate ext/extmk.rb.

* Makefile.in: execute directly $(srcdir)/ext/extmk.rb.
  remove -Cext option, "Dir::chdir 'ext'" in ext/extmk.rb.

* {win32,bccwin32}/Makefile.sub: ditto.

* instruby.rb: ditto.

* ext/extmk.rb: renamed from ext/extmk.rb.in.

* lib/mkmf.rb (module Logging): create log files (mkmf.log)
  in each extension module directories.

* ext/extmk.rb: ditto.

* lib/mkmf.rb (macro_defined?): new method.

* ext/.cvsignore: remove extmk.rb.

* ext/*/.cvsignore: add "*.def".


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-08 09:08:15 +00:00
matz 3a0f79267e = should be ==
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-05 02:11:41 +00:00
michal 869159006a Fix rb_digest_base_become (ruby-core:428)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-04 09:21:07 +00:00
matz 64901cd69b * class.c (rb_make_metaclass): obj.meta.super.meta should be equal
to obj.meta.meta.super (ruby-bugs-ja:PR#324).

* parse.y (yylex): the warning message "invalid
  character syntax" was never issued.

* marshal.c (r_bytes): do not use alloca (ruby-bugs:PR#382).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-04 06:37:39 +00:00
matz 6f484e4930 * variable.c (rb_copy_generic_ivar): remove old generic instance
variable table if it existes.

	* class.c (rb_make_metaclass): metaclass of a metaclass is a
	  metaclass itself.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-03 05:20:14 +00:00
H_Konishi d0b3651906 new platform [bccwin32] merged.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-11 01:27:48 +00:00
knu 27aff97238 Probably */depend should be added to this file too.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-21 20:11:49 +00:00
nobu 5979f0e288 * ext/digest: add depend file.
* ext/digest/md5: ditto.

* ext/digest/rmd160: ditto.

* ext/digest/sha1: ditto.

* ext/digest/sha2: ditto.

* ext/iconv/MANIFEST: ditto.

* ext/stringio/MANIFEST: ditto.

* ext/syslog: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-18 09:24:39 +00:00
knu 4e840877aa * ext/digest/sha2/sha2.c: Merge from rough. Fix a couple of
off-by-one errors in Aaron Gifford's code.

  Obtained from:  KAME via FreeBSD
  KAME PR:        393
  FreeBSD PR:     kern/34242


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-26 22:09:49 +00:00
knu d9479e72a6 Merge from rough.
- Avoid namespace pollution. (MD5_* -> rb_Digest_MD5_*, etc.)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-24 08:20:50 +00:00
nobu c4449fd4c4 * ext/digest/md5/md5init.c (Init_md5): rb_cvar_declare() is
replaced by rb_cvar_set().

* ext/digest/rmd160/rmd160init.c (Init_rmd160): ditto.

* ext/digest/sha1/sha1init.c (Init_sha1): ditto.

* ext/digest/sha2/sha2init.c (Init_sha2): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-17 12:43:44 +00:00
matz c0a636b6f9 * st.c: primes should be primes.
* 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
2002-01-16 09:25:59 +00:00
matz 67245eec71 * eval.c (rb_thread_restore_context): save current value of
lastline and lastmatch in the thread struct for later restore.

* eval.c (rb_thread_save_context): restore lastline and lastmatch.

* numeric.c (flo_to_s): should handle negative float value.

* class.c (rb_include_module): should check whole ancestors to
  avoid duplicate module inclusion.

* string.c (trnext): should check backslash before updating "now"
  position.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-09-08 14:17:53 +00:00
knu 970dbfde6f * ext/digest/digest.c (rb_digest_base_s_hexdigest): remove a debug
print.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-09-06 05:29:27 +00:00
knu 4c9a9a620a * ext/digest/digest.c (rb_digest_base_s_digest,
rb_digest_base_s_hexdigest): ensure that a string is given.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-09-06 05:02:29 +00:00
eban e15efe7733 * ext/digest/sha2/extconf.rb: fix support for cross-compiling.
* mkconfig.rb: fix support for autoconf 2.52.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-08-20 10:56:03 +00:00
knu 6ce3130067 * ext/digest/*/extconf.rb: really fix so that they build from any
directory.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-08-14 20:05:21 +00:00
knu ad4c17c021 * ext/digest/sha2/extconf.rb: fix so that they build from any
directory.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-08-14 19:05:37 +00:00
knu 6a581e6317 * ext/digest/defs.h: Define NO_UINT64_T instead of emitting an
error to fail.

* ext/digest/sha2/extconf.rb: Do not exit on error, and utilize
  NO_UINT64_T to detect if the system has a 64bit integer type.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-08-14 17:04:00 +00:00
knu 5b63fc556f * ext/digest/sha2/extconf.rb: do not create Makefile when no 64bit
integer type is detected.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-08-14 12:15:21 +00:00
knu eaddc4a94b Rename *.jp to *.ja, since jp is a region code and ja is a language
code.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-19 05:44:26 +00:00
knu f4b516777b * ext/digest/*/extconf.rb: fix so that they build from any
directory.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-14 03:29:50 +00:00
knu 76d7dae26a Import the "digest" module and the submodules, from the Rough Ruby
project.

  ext/digest:
    This module provides the module Digest and the abstract class
    Digest::Base.

  ext/digest/md5 (which obsoletes ext/md5):
    This module provides the class Digest::MD5 which implements the
    MD5 Message-Digest Algorithm.

  ext/digest/rmd160:
    This module provides the class Digest::RMD160 which implements the
    RIPEMD-160 cryptographic hash function.

  ext/digest/sha1 (which obsoletes ext/sha1):
    This module provides the class Digest::SHA1 which implements the
    SHA-1 Secure Hash Algorithm.

  ext/digest/sha2:
    This module provides the classes Digest::SHA256, Digest::SHA384
    and Digest::SHA512 which implement the SHA-256, SHA-384 and
    SHA-512 Secure Hash Algorithms, respectively.

  lib/md5.rb, lib/sha1.rb:
    These files are provided for backward compatibility.

All these classes have the common API, which previously ext/md5 and
ext/sha1 modules provided.  While the new API keeps 100% backward
compatibility, it has been enriched with several utility methods.

Read digest.txt for further details.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-13 20:06:14 +00:00