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

2177 Коммитов

Автор SHA1 Сообщение Дата
nahi 9c219837b3 * lib/logger.rb: new file. Logger, formerly called devel-logger or
Devel::Logger.

* sample/logger/*: new file.  samples of logger.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-18 06:31:25 +00:00
matz ea2e8d3592 * eval.c (localjump_destination): should not raise ThreadError
exception for "break". [ruby-dev:21348]

* eval.c (proc_invoke): use result instead of prot_tag->retval.
  retval is no longer propagated to the ancestors.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-17 14:45:25 +00:00
nobu 6d779ac139 re-formatted wrongly.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-17 11:39:28 +00:00
nobu d3b780b1cf * parse.y (tokadd_string, parse_string, yylex): escaped terminator
is now interpreted as is.  [ruby-talk:82206]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-17 11:34:02 +00:00
aamine 577fa4c6a8 * test/fileutils/fileassertions.rb: new file.
* test/fileutils/test_fileutils.rb: new file.
* test/fileutils/test_nowrite.rb: new file.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-17 09:52:50 +00:00
aamine ed970e2513 * test/strscan/test_stringscanner.rb: require test/unit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-17 09:51:32 +00:00
aamine dbfd0ae0bb * test/strscan/test_stringscanner.rb: new file.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-17 09:36:04 +00:00
gotoyuzo 30103702c3 * ext/openssl: all files are reviewed to simplify and avoid memory leak.
* ext/openssl/extconf.rb: add check for assert.h.

* ext/openssl/ossl.c (ossl_buf2str): new function to convert
  C buffer to String and free buffer.

* ext/openssl/ossl.c (ossl_x509_ary2sk): new function to convert
  Array of OpenSSL::X509 to STACK_OF(X509) with exception safe.

* ext/openssl/ossl.c (ossl_to_der, ossl_to_der_if_possible): new
  functions to convert object to DER string.

* ext/openssl/ossl.h: ditto.

* ext/openssl/ossl_bio.c (ossl_membio2str): new function to convert
  BIO to String object and free BIO.

* ext/openssl/ossl_bio.h: ditto.

* ext/openssl/ossl_pkcs7.c (ossl_pkcs7_to_der): add for "to_der".

* ext/openssl/ossl_x509name.c (ossl_x509name_to_der): ditto.

* ext/openssl/ossl_x509ext.c (ossl_x509ext_to_der): ditto.

* ext/openssl/ossl_x509ext.c (create_ext_from_array): removed
  and reimplement in openssl/x509.rb.

* ext/openssl/ossl_x509attr.c: reimplemented and disable some
  method temporarily. this class doesn't work fine without ASN.1
  data support;-) I'll rewrite in near future.

* ext/openssl/lib/openssl/x509.c (X509::Attribute): get rid off
  unused code.

* ext/openssl/lib/openssl/x509.c (X509::ExtensionFactory): refine all.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-17 09:05:02 +00:00
matz 12196ee24f * regex.c (re_compile_pattern): should not translate character
class range edge. [ruby-list:38393]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-16 17:37:34 +00:00
nahi a59f05a455 * test/csv/test_csv.rb: add negative tests of row_sep.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-16 13:26:10 +00:00
eban 57606ec408 * MANIFEST: add test/csv/mac.csv.
* win32/Makefile.sub, bcc32/Makefile.sub (test): add phony NUL target.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-16 07:50:00 +00:00
nahi ffc136a024 * lib/csv.rb: add extra pamameter to specify row(record) separater character.
To parse Mac's CR separated CSV, do like this.
    CSV.open("mac.csv", "r", ?,,?\r) { |row| p row.to_a }
  The 3rd parameter in this example ?, is for column separater and the 4th ?\r
  is for row separater.  Row separater is nil by default.  Nil separater means
  "\r\n" or "\n".

* test/csv/test_csv.rb: add tests for above feature.

* test/csv/mac.csv: added.  Sample CR separated CSV file.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-15 10:07:42 +00:00
michal bd96b4c8cc OpenSSL update
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-12 13:46:48 +00:00
nobu ecf0c48d5a * intern.h (rb_disable_super, rb_enable_super): replace with dummy
expressions instead of prototypes.  the functions remain yet for
  binary compatibility.  [ruby-talk:81758]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-12 03:30:45 +00:00
matz fc8e62d0df * bignum.c (rb_big_and): convert argument using 'to_int'.
* bignum.c (rb_big_or): ditto.

* bignum.c (rb_big_xor): ditto.

* eval.c (rb_f_require): allow "require" on $SAFE>0, if feature
  name is not tainted.

* lib/rexml/parsers/baseparser.rb (REXML::Parsers::BaseParser::stream):
  Supports StringIO.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-12 03:16:31 +00:00
dblack 960b91c629 whitespace fix in ChangeLog entry
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-11 22:15:58 +00:00
dblack 689389ac95 lib/scanf.rb
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-11 22:13:50 +00:00
gotoyuzo fb65eed72e * ext/openssl/ossl.h: define OSSL_NO_CONF_API for win32 platform.
libeay32.dll doesn't export functions defined in conf_api.h.
  this workaround is to avoid link error.

* ext/openssl/ossl_config.c (ossl_config_initialize): ditto.

* ext/openssl/ossl_config.c (ossl_config_add_value): ditto.

* ext/openssl/ossl_config.c (set_conf_section_i): should check
  if the argument is Array.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-10 13:58:31 +00:00
usa 3587c1c725 * eval.c (win32_get_exception_list): avoid VC7 warning.
[ruby-win32:577]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-10 13:43:27 +00:00
nagai 7038484831 * fill empty full-name fields on ChangeLog. Sorry.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-09 01:44:16 +00:00
nobu 80edcf82a1 * eval.c (struct tag): dst should be VALUE.
* eval.c (localjump_destination): stop at the scope where the current
  block was created.  [ruby-dev:21353]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-09 01:39:58 +00:00
gotoyuzo 9edcc5e99a * ext/openssl/ossl_config.rb: avoid compile error in OpenSSL-0.9.6.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-08 20:19:01 +00:00
gotoyuzo dba351e9c2 * lib/webrick/httpserver.rb (HTTPServer#access_log): add "\n" to
the message.

* lib/webrick/log.rb (BasicLog#log): add "\n" only if needed.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-08 16:57:25 +00:00
nagai 56663d45fc * forget the file path for the ChangeLog entry. Sorry.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-08 13:21:16 +00:00
nagai 8951a69a16 * multi-tk.rb: modify security check at creating a new interpreter
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-08 13:16:57 +00:00
nobu 22bb1debf9 * lib/optparse.rb, lib/optparse/version.rb: search also all
capital versions.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-08 11:00:17 +00:00
gotoyuzo 78ff3833fb * ext/openssl/ossl.h: include openssl/conf.h and openssl/conf_api.h.
* ext/openssl/ossl_config.c: refine all with backward compatibility.

* ext/openssl/ossl_config.h: export GetConfigPtr() and DupConfigPtr().

* ext/openssl/ossl_x509.c: added new constants under X509 module.
  DEFAULT_CERT_AREA, DEFAULT_CERT_DIR, DEFAULT_CERT_FILE,
  DEFAULT_CERT_DIR_ENV, DEFAULT_CERT_FILE_ENV and DEFAULT_PRIVATE_DIR.

* ext/openssl/ossl_x509ext.c (ossl_x509extfactory_free): don't free
  the members of the struct. it's left to GC.

* ext/openssl/ossl_x509ext.c (ossl_x509_set_config): add for config=.

* ext/openssl/ossl_x509ext.c (Xossl_x509extfactory_initialize):
  add attr readers: issuer_certificate, subject_certificate,
  subject_request, crl and config.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-08 10:31:38 +00:00
gotoyuzo 7fb00c94e8 * ext/openssl/ossl.h: include openssl/conf.h and openssl/conf_api.h.
* ext/openssl/ossl_config.c: refine all with backward compatibility.

* ext/openssl/ossl_config.h: export GetConfigPtr() and DupConfigPtr().

* ext/openssl/ossl_x509.c: new constants (DEFAULT_CERT_AREA,
  DEFAULT_CERT_DIR, DEFAULT_CERT_FILE, DEFAULT_CERT_DIR_ENV,
  DEFAULT_CERT_FILE_ENV and DEFAULT_PRIVATE_DIR) in X509 module.

* ext/openssl/ossl_x509ext.c (ossl_x509extfactory_free): don't free
  the members of the struct. it's left to GC.

* ext/openssl/ossl_x509ext.c (ossl_x509_set_config): add for config=.

* ext/openssl/ossl_x509ext.c (Xossl_x509extfactory_initialize):
  add attr readers: issuer_certificate, subject_certificate,
  subject_request, crl and config.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-08 10:28:46 +00:00
gotoyuzo ddae426a47 * lib/webrick/accesslog.rb (AccessLog::setup_params): use req.port
instead of config[:Port] or req.request_uri.port.

* lib/webrick/httprequest.rb (HTTPRequest#meta_vars): ditto.

* lib/webrick/httpservlet/filehandler.rb (FileHandler#dir_list): ditto.

* lib/webrick/config.rb: :Listen option never be used.

* lib/webrick/server.rb (GenericServer#initialize): don't use :Listen
  option and add warning message.

* lib/webrick/log.rb (BasicLog#<<): shortcut of log(INFO, ...).

* lib/webrick/httpserver.rb (HTTPServer#accesslog): use << for logging.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-08 09:52:34 +00:00
nagai 865ff7fb4f * tcltklib.c (lib_mainloop_core): fixed signal-trap bug
* multi-tk.rb, tk.rb, tkafter.rb, tkcanvas.rb, tkfont.rb, tktext.rb,
  tkvirtevent.rb : Ruby/Tk works at $SAFE == 4


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-07 07:10:44 +00:00
nahi a7357c1965 * test/ruby/test_*.rb: assert_same, assert_match, and so on.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-06 17:27:58 +00:00
matz b3a729a107 * parse.y (assignable): call rb_compile_error(), not rb_bug().
[ruby-core:01523]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-06 16:18:02 +00:00
gotoyuzo 256d273e69 * ext/openssl/ruby_missing.c: rid of unnecessary backward
compatibility stuff. and remove DEFINE_ALLOC_WRAPPER from
  all sources.

* ext/openssl/ossl_x509ext.c (X509::Extension.new): new method.

* ext/openssl/ossl_x509ext.c (X509::Extension#oid=): new method.

* ext/openssl/ossl_x509ext.c (X509::Extension#value=): new method.

* ext/openssl/ossl_x509ext.c (X509::Extension#critical=): new method.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-06 08:56:09 +00:00
usa 05ea0b76e6 * win32/win32.c (CreateChild): need to quote cmd if RUBYSHELL is set.
* win32/win32.c (CreateChild): fix condition about whether to call
  shell or not.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-05 16:25:55 +00:00
nobu b6367d64f4 * win32/win32.c (isInternalCmd): stupid miss.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-05 15:36:21 +00:00
nobu 30f5a38b46 * Makefile.in (test): phony target.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-05 15:21:59 +00:00
nobu 44785befea * lib/optparse.rb (OptionParser#order, #permute, #parse): allow an
array as argument.

* test/ruby/test_*.rb: moved invariants to left side in
  assert_equal, and use assert_nil, assert_raises and so on.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-05 15:15:43 +00:00
nobu 01e3a55648 * lib/mkmf.rb (have_library, find_library): configure by library
name.

* win32/win32.c (isInternalCmd): distinguish command.com and
  cmd.exe.

* win32/win32.c (make_cmdvector): a character just after wildcard
  was ignored.  [ruby-core:01518]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-05 15:00:33 +00:00
nahi 65264eadbd * test/ruby/test_*.rb: replace 'assert(a == b)' with assert_equal(a, b)'
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-05 11:28:27 +00:00
gotoyuzo d9f38cbee8 * ext/openssl/lib/openssl/x509.rb: new method X509::Name::parse.
* ext/openssl/ossl_digest.c: add ossl_digest_new().

* ext/openssl/ossl_digest.h: ditto.

* ext/openssl/ossl_cipher.c: add ossl_cipher_new().

* ext/openssl/ossl_cipher.h: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-05 09:08:40 +00:00
nobu 8d4d2e4323 * misc/ruby-mode.el (ruby-font-lock-maybe-here-docs): should not
search delimiter forward if found in backward.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-05 06:32:07 +00:00
matz c492b9b085 * eval.c (mark_frame_adj): need to adjust argv pointer if using
system's alloca. [ruby-core:01503]

* io.c (rb_f_gets): should call next_argv() before type check
  current_file. [ruby-list:38336]

* eval.c (proc_invoke): should retrieve retval when pcall is true.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-05 05:07:54 +00:00
nobu 4198feb844 * test/runner.rb: arguments should be keys.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-05 04:32:51 +00:00
eban bd895e909d * test/ruby/test_system.rb (test_system): check existence of ruby
interpreter.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-05 03:12:29 +00:00
nobu 73e4384a23 * lib/optparse.rb (--version): fix assignment/reference order.
* lib/optparse.rb (OptionParser#help): new; OptionParser#to_s may
  be deprecated in future.

* lib/optparse/version.rb (OptionParser#show_version): hide Object.

* test/runner.rb: fix optparse usage.

* test/runner.rb: glob all testsuits if no tests given.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-05 02:32:24 +00:00
nahi e45738a297 * test/runner.rb: added. gets testcases from command line and runs it.
* test/ruby/test_gc.rb: remove useless part which was for dumping test result.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-05 01:47:41 +00:00
nahi af49aecff1 * test/ruby/test_gc.rb: added. splitter.rb which I made to split
sample/test.rb into test/ruby/test_* kindly removed GC test (the last section
  in the original test) to reduce things to be worried.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-05 00:36:47 +00:00
nobu d43872e7df * test/ruby/test_iterator.rb (test_block_in_arg): add no block
given tests.

* test/ruby/test_iterator.rb (test_ljump): uncomment LocalJumpError
  test.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-04 18:00:09 +00:00
nahi aaf5d9c03c * test/ruby: tests for ruby itself.
* test/ruby/test_*.rb: split sample/test.rb into 28 test/unit testcases.  some
  tests could not be translates...  search '!!' mark to see it.

* test/csv/test_csv.rb: should require 'csv', not '../lib/csv'.  test runner
  should set load path correctly.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-04 16:18:59 +00:00
nahi 822a72b8ee * test/csv/test_csv.rb: close opened files for CSV::IOBuf explicitly. opened
file cannot be removed under win32 box.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-04 16:06:41 +00:00