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

2391 Коммитов

Автор SHA1 Сообщение Дата
nobu c0e5a7c63f * eval.c (localjump_error): id should be ID.
* eval.c (rb_eval): nd_rval is set in copy_node_scope().

* eval.c (rb_yield_0): unused variable.

* eval.c (rb_yield_0): nothing to do for empty node.

* eval.c (call_end_proc, proc_invoke): adjust backtrace in END.
  [ruby-dev:21551]

* eval.c (rb_thread_start_0): set the value by break as the result.
  [ruby-dev:21552]

* eval.c (rb_thread_start_0, rb_thread_raise, rb_callcc): save
  variables across THREAD_SAVE_CONTEXT.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-08 21:43:36 +00:00
ntalbott 09d2946061 * lib/test/unit.rb: removed installation instructions.
* lib/test/unit/ui/testrunnermediator.rb: moved the run flag to a more
	  central location.

	* lib/test/unit.rb: ditto.

	* lib/test/unit.rb: extracted the running code in to AutoRunner.

	* lib/test/unit/autorunner.rb: added.

	* lib/test/unit/collector/objectspace.rb: extracted common test
	  collection functionality in to a module.

	* lib/test/unit/collector.rb: ditto; added.

	* test/testunit/collector/test_objectspace.rb: ditto.

	* lib/test/unit/collector/dir.rb: added. Supports collecting tests out
	  of a directory structure.

	* test/testunit/collector/test_dir.rb: added.

	* test/runner.rb: simplified to use the new capabilities.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-08 13:21:28 +00:00
nahi cd8d08b532 * test/ruby/test_beginendblock.rb: add tests for nested BEGIN/END.
* test/ruby/beginmainend.rb: add tests for nested BEGIN/END.

* test/ruby/endblockwarn.rb: new file added to test of END-in-method warning.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-07 06:27:11 +00:00
akr 0a5f6fd37d define Fcntl::O_ACCMODE instead of Fcntl::ACCMODE to be consist with
other constants.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-07 03:30:55 +00:00
akr 4f6558a4ec * ext/fcntl/fcntl.c (Init_fcntl): define Fcntl::ACCMODE.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-07 03:24:11 +00:00
akr 9c6cfb5672 * ext/socket/extconf.rb: useless assignment removed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-07 01:04:07 +00:00
nobu cda830ff33 * test/ruby/test_beginendblock.rb (test_endinmethod): END{} is now
allowed in eval.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-07 00:13:29 +00:00
nobu 6fc88be3d9 * parse.y (stmt): should not expand mrhs if lhs is solely starred.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-06 19:15:29 +00:00
matz 8a4abe47ca * parse.y (stmt): rhs of multiple assignment should not be
expanded using "to_a". [ruby-dev:21527]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-06 17:59:53 +00:00
gotoyuzo 0dd4fde745 * ext/openssl/ossl_asn1.c (ossl_asn1_get_asn1type): use appropriate
free function for ASN1_OBJECT.

* ext/openssl/ossl_asn1.c (ossl_asn1obj_get_sn): add new function for
  ASN1::ObjectId#sn; it returns short name text representation of OID.

* ext/openssl/ossl_asn1.c (ossl_asn1obj_get_ln): add new function for
  ASN1::ObjectId#ln; it returns long name text representation of OID.

* ext/openssl/ossl_asn1.c (ossl_asn1obj_get_oid): add new function for
  ASN1::ObjectId#oid; it returns numerical representation of OID.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-06 16:55:00 +00:00
nahi 11d2edffe6 * lib/csv.rb (IOReader, BasicWriter): call binmode when a given IO
respond_to?(:binmode).  record separator was wrong when you gave text mode IO
  to Reader.parse and Writer.generate.

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


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-06 14:03:58 +00:00
akr 26d111540e * ext/socket/extconf.rb: check recvmsg even if sendmsg is exists.
* ext/socket/socket.c (thread_read_select): restored.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-06 11:11:07 +00:00
nobu 2a07445e0b * marshal.c (w_object): wrong method name in the message.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-06 07:23:40 +00:00
matz 49e8bdf7a3 * parse.y (stmt): END in method should cause warning.
[ruby-dev:21519]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-06 07:03:20 +00:00
nahi 6e6b863d53 * test/ruby/test_iterator.rb (test_block_argument_without_paren): added.
(follows sample/test.rb)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-06 06:18:45 +00:00
nahi 3d307549a5 * test/ruby/test_beginendblock.rb, test/ruby/beginmainend.rb: added test for
eval-ed BEGIN END order.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-06 02:58:39 +00:00
matz 56235e083d * marshal.c (w_object): should pass "weak" value to next level.
[ruby-dev:21496]

* eval.c (proc_alloc): should not use cached object if klass is
  different. [ruby-talk:83685]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-06 01:50:41 +00:00
akr 4fca6e91dc * lib/pathname.rb: version information is added in document.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-05 14:31:35 +00:00
nobu 92abdcefe4 * eval.c (rb_f_END): block should be given. [ruby-dev:21497]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-05 14:07:07 +00:00
gotoyuzo f58812a7e2 * lib/ext/openssl/extconf.rb: add check for some engine functions
unavailable in OpenSSL-0.9.6.

* lib/ext/openssl/ossl_engine.c: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-05 13:58:02 +00:00
nobu 4aa8b47bb9 * eval.c (rb_eval): fix evaluation order. [ruby-list:38431]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-05 08:56:34 +00:00
akira 12c8c18f09 * test/uri/*: translated RUNIT to Test::Unit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-05 06:09:26 +00:00
nahi 16658578a5 * lib/xsd/datatypes.rb: Rational -> Decimal string bug fix.
* test/soap/marshal/test_marshal.rb: ditto.

* test/soap/calc/test_calc_cgi.rb: add Config::CONFIG["EXEECT"] to RUBYBIN.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-05 05:42:04 +00:00
nahi d50d6d396a * test/ruby/test_beginendblock.rb, test/ruby/beginmainend.rb: add tests about
scope, order and allowd syntax.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-05 04:51:05 +00:00
nahi d77b17aa73 * test/ruby/envutil.rb: added. split "rubybin" from test_system.rb.
* test/ruby/test_system.rb: use envutil.rb

* test/ruby/test_beginendblock.rb: added.

* test/ruby/beginmainend.rb: added.  used in test_beginendblock.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-05 02:56:42 +00:00
ntalbott 1e85ca8a02 * test/testunit/runit/test_testresult.rb: removed some unnecessary
cruft.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-05 02:23:48 +00:00
ntalbott b60827ba04 * lib/rubyunit.rb: aliasing TestCase into the top level is
problematic.

	* lib/runit/assert.rb: fixed a couple of bugs caused by recent
	  refactoring in Test::Unit.

	* test/testunit/runit/*: added.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-05 02:17:07 +00:00
nahi 0cf763af9c * lib/open-uri.rb (URI::Generic#find_proxy): no_proxy support did not work.
[ruby-dev:21484]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-05 02:00:29 +00:00
ntalbott cc32628660 * lib/test/unit/assertions.rb: will use pp for output if available.
Can be disabled by setting Assertions.use_pp = false.

	* test/testunit/test_assertions.rb: made a small change to exception
	  formatting.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-05 00:59:02 +00:00
ntalbott 82f064a524 * lib/test/unit/assertions.rb: made small improvements to assertion
messages. Deprecated Assertions#assert_not_nil; use #assert instead.

	* test/testunit/test_assertions.rb: ditto.

	* test/testunit/util/test_procwrapper.rb: use #assert instead of
	  #assert_not_nil.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-04 21:40:17 +00:00
ntalbott 960f29a956 * lib/test/unit/assertions.rb: refactored message building.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-04 19:18:52 +00:00
gotoyuzo 0afc6e3f4f delete CVS confliction indicator. sorry.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-04 18:48:32 +00:00
gotoyuzo d0dd2997f3 * ext/openssl/ossl_asn1.h: global symbols should be declared
as external.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-04 18:45:53 +00:00
akira 993783d84a * test/ruby/test_exception.rb (test_else): added.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-04 18:06:19 +00:00
matz 415283ac95 * marshal.c (w_object): instance variable dump do not cause error
for objects that cannot be dumped, if they traversed from
  marshal_dump.  they are just ignored.

* gc.c (Init_stack): cast "space" (doble value) into unsigned
  int.  should run on PowerPC.

* eval.c (rb_eval): should not execute else part if any exception
  is caught. [ruby-dev:21482]

* parse.y (f_args): should allow unparenthesized block argument.

* parse.y (f_rest_arg): should allow unparenthesized rest
  argument.

* lib/irb/ruby-lex.rb (RubyLex::identify_identifier): support
  'class ::Foo' syntax. [ruby-talk:83514]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-04 17:51:11 +00:00
ntalbott 28af5f6cf5 * lib/test/unit/assertions.rb: changed assertion messages to rely more
heavily on #inspect. Added backtrace filtering for exceptions in
	  assertion messages.

	* test/testunit/test_assertions.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-04 17:18:27 +00:00
seki 22c0d83eb1 * lib/drb/acl.rb, lib/drb/ssl.rb: added.
* lib/drb/drb.rb: exit from a thread using 'break'.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-04 17:15:50 +00:00
eban d821751c85 * gc.c (Init_stack): the type of space is changed to unsigned int
from double.  [ruby-dev:21483]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-04 12:51:32 +00:00
nahi cbef5b65db * lib/soap/netHttpClient.rb: follow http-access2. hosts which matches
ENV['no_proxy'] or ENV['NO_PROXY'] is not proxyed.
  - [,:] separated. ("ruby-lang.org:rubyist.net")
  - no regexp. (give "ruby-lang.org", not "*.ruby-lang.org")
  - if you want specify hot by IP address, give full address.
    ("192.168.1.1, 192.168.1.2")

* lib/soap/rpc/cgistub.rb: return "Status: XXX MMM" line.

* test/runner.rb: give testsuite name.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-04 08:57:11 +00:00
akr 94e01ab645 * lib/pathname.rb (initialize): raise ArgumentError if argument has
'\0' character.
  (relative_path_from): new method.
  (each_entry): new method for replacement of dir_foreach.
  (foreach, foreachline, dir_foreach, chdir): obsoleted.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-04 06:04:59 +00:00
akira ef5883c016 * test/uri/* (6 files): added.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-04 04:02:16 +00:00
akira d6f70951db * lib/uri/ftp.rb, lib/uri/mailto.rb: renamed to #to_s from #to_str.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-04 03:49:01 +00:00
ntalbott 51267d1177 * lib/test/unit/testsuite.rb: changed #<< to return self, and added
#delete.

	* test/testunit/test_testsuite.rb: ditto. Also slightly refactored
	  #test_size.

	* lib/test/unit/collector/objectspace.rb: collector now preserves the
	  hierarchy of suites.

	* test/testunit/collector/test_objectspace.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-03 22:35:19 +00:00
why df0e9dbe97 * ext/syck/rubyext.c: default keys handled.
* ext/syck/syck.h: lowered default buffer size to 16k for increased
  performance.

* test/yaml: checkin of basic unit tests.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-03 19:51:25 +00:00
gotoyuzo 7d18f560f5 * ext/openssl/extconf.rb: add check for X509V3_set_nconf.
* ext/openssl/ossl_x509ext.c (ossl_x509extfactory_set_config):
  cannot implement if X509V3_set_nconf doesn't exist.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-03 19:29:13 +00:00
gotoyuzo 9d04d1df14 ossl_asn1.h was included twice.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4665 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-03 17:59:44 +00:00
nahi 6ea9e723ea * lib/xsd/datatypes.rb: dump sign by itself. under the problematic platform,
sprintf("%+.10g", -0.0) => +0.  Sigh.

* sample/wsdl/amazon/*: update schema ver2 to ver3.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-03 17:15:23 +00:00
akr f047918d09 * lib/pathname.rb (initialize): duplicate and freeze argument.
(to_s): return duplicated string.
(children): new method.
(each_line): new alias to foreachline.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-03 16:36:24 +00:00
gotoyuzo 5af0a758d4 * ext/openssl/ossl_asn1.c: add DER encoder and decoder.
* ext/openssl/ossl_asn1.h: add OpenSSL::ASN1 module.

* ext/openssl/ossl.c (Init_openssl): call Init_ossl_asn1.

* ext/openssl/ossl.h: include ossl_asn1.h.

* ext/openssl/extconf.rb: check if X509_ATTRIBUTE has field "single".

* ext/openssl/ossl_x509attr.c (ossl_x509attr_set_value): accept
  DER encoded data argument.

* ext/openssl/ossl_x509attr.c (ossl_x509attr_get_value): return
  DER encoded data in OpenSSL::ASN1 types.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-03 08:58:01 +00:00
ntalbott b0ccb799ec * lib/test/unit.rb: refactored to use optparse.
* lib/test/unit.rb: added support for selecting the output
	  level from the command-line.

	* lib/test/unit.rb: added a command-line switch to stop processing
	  the command-line, allowing arguments to be passed to tests.

	* lib/test/unit.rb: changed the method for specifying a runner or a
	  filter from the command-line.

	* lib/test/unit/collector/objectspace.rb: fixed a bug causing all
	  tests to be excluded when the filter was set to an empty array.

	* test/testunit/collector/test_objectspace.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-03 04:04:26 +00:00
ntalbott 47bd3ed9ce * lib/test/unit/assertions.rb: added a default message for #assert,
#assert_block, and #flunk.

	* test/testunit/test_assertions.rb: ditto.

	* lib/test/unit/failure.rb: failures now show a better trace of where
	  they occurred.

	* test/testunit/test_failure.rb: ditto (added).

	* lib/test/unit/testcase.rb: ditto.

	* test/testunit/test_testcase.rb: ditto.

	* lib/test/unit/util/backtracefilter.rb: added.

	* test/testunit/util/test_backtracefilter.rb: added.

	* lib/test/unit/error.rb: changed to use BacktraceFilter and improved
	  output.

	* test/testunit/test_error.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-02 23:03:13 +00:00
nobu 4d5204c990 * ext/iconv/iconv.c (iconv_failure_initialize): conform with
orthodox initialization method.

* ext/iconv/iconv.c (iconv_fail): initialize exception instance
  from the class, and do not share instance variables with the
  others.  [ruby-dev:21470]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-02 11:33:52 +00:00
nobu 38d1922038 * time.c (Init_Time): define initialize. [ruby-dev:21469]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-02 09:20:31 +00:00
gotoyuzo d77b606edd * ext/openssl/ossl_engine.c: add a new module OpenSSL::Engine.
it supports OpenSSL hardware cryptographic engine interface.

* ext/openssl/ossl_engine.h: ditto.

* ext/openssl/MANIFEST: add ossl_engine.c and ossl_engine.h.

* ext/openssl/extconf.rb: add check for openssl/engine.h.

* ext/openssl/ossl.c: call Init_ossl_engine().

* ext/openssl/ossl.h: include openssl/engine.h.

* ext/openssl/ossl_pkey_{rsa,dsa,dh}.c: check if underlying
  EVP_PKEY referes engine.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-02 08:47:11 +00:00
matz 10c4bb29b2 * time.c (time_load): restore instance variables (if any) before
loading from marshaled data.

* time.c (time_mdump): new marshal dumper. _dump is still
  available for compatibility.

* time.c (time_mload): new marshal loader.

* marshal.c (w_object): preserve instance variables for objects
  with marshal_dump.

* marshal.c (r_object0): restore instance variables before calling
  marshal_load.

* error.c (rb_warn_m): always return nil.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-02 08:25:00 +00:00
nobu a70a430f83 * ext/iconv/iconv.c (iconv_fail): now yield erred substring, and
set error object to $!.

* ext/iconv/iconv.c (iconv_convert): error handler block should
  return appended part and the rest.  if rest is nil, the
  conversion stops.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-02 05:19:18 +00:00
nobu 83740fa4bd * variable.c (rb_const_defined_0): look up constants in Object as
well.  [ruby-dev:21458]

* test/ruby/test_defined.rb (TestDefined::test_defined): test for
  constants.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-02 03:00:23 +00:00
ntalbott 18ef8f1078 * lib/test/unit/assertions.rb: should not capture an
AssertionFailedError unless explicitly requested.

	* test/testunit/test_assertions.rb: ditto.

	* test/testunit/collector/test_objectspace.rb: fixed a test failure
	  caused by methods being returned in different orders on different
	  platforms by moving test sorting from TestSuite into the locations
	  where suites are constructed. [ruby-talk:83156]

	* lib/test/unit/testcase.rb: ditto.

	* lib/test/unit/testsuite.rb: ditto.

	* lib/test/unit/collector/objectspace.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-02 02:20:42 +00:00
usa 8caf81f1ea * eval.c (rb_thread_raise): prototype; avoid VC++ warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-01 18:26:11 +00:00
matz 63aa00cb08 * eval.c (rb_f_block_given_p): real required condition is
ruby_frame->prev->iter == ITER_CUR.

* eval.c (rb_block_given_p): ditto.

* eval.c (block_pass): update ruby_frame->iter only when previous
  value is ITER_NOT.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-01 16:36:47 +00:00
matz f5a7147634 * variable.c (rb_const_defined_at): should exclude constants from
Object when TYPE(klass) == T_MODULE *and* exclude is on.
  [ruby-dev:21458]

* variable.c (rb_const_get_0): do not lookup constants from Object
  when TYPE(klass) == T_MODULE *and* exclude is on.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-01 16:06:19 +00:00
nahi 637af54751 * test/logger/test_logger.rb: unlinking file before close causes problem under
win32 box.

* lib/xsd/datatypes.rb(XSDFloat, XSDDouble): add +/- sign explicitly when
  stringified and embedded into XML instance.  Ruby's sprintf may format -0.0
  as "0.0" (no minus sign) depending on underlying C sprintf implementation.

* test/xsd/test_xsd.rb, test/soap/test_basetype.rb: follow above change.

* test/soap/calc/*: give httpd config param "CGIInterpreter".
  "/usr/bin/env ruby" thing does not work under non-Unix boxes.

* ChangeLog: corrected wrong DoW of my log entries...


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-01 15:29:43 +00:00
nobu 379c5c1e43 * ext/etc/etc.c (etc_getgrent): typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-01 15:26:06 +00:00
nobu 5c547fd3e2 * signal.c (ruby_signal_name): adjust to the prototype.
* process.c (pst_inspect): ditto.

* ext/etc/etc.c (Init_etc): typo.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-01 15:14:23 +00:00
matz 969f4d4c68 * ext/etc/etc.c: add new functions: setpwent, getpwent, endpwent,
setgrent, getgrent, endgrent.

* ext/socket/socket.c (sock_s_gethostbyname): do not reverse lookup.

* Makefile.in: copy lex.c from $(srcdir) if it's not the current
  directory.  [ruby-dev:21437]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-01 13:41:35 +00:00
nobu cbb7a67c32 * gc.c (heaps): manage slots and limits together. [ruby-dev:21453]
* gc.c (add_heap): should not clear heaps slot even if realloc()
  failed.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-01 11:49:44 +00:00
eban af69003eb5 * MANIFEST: add wince/mkconfig_wce.rb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-01 11:37:19 +00:00
nobu 28057a36b6 * eval.c (rb_load): Object scope had priority over required file
scope.  [ruby-dev:21415]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-01 08:01:33 +00:00
uema2 85ead97f2b * wince/mkconfig_wce.rb: sorry, forget to commit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-01 05:12:25 +00:00
uema2 952e9b9fba * wince/setup.mak: add sigmarionIII SDK support.
* wince/Makefile.sub: ditto.

* wince/mkexports.rb: fix linker error in SH4.

* wince/mkconfig_wce.rb: camouflage RUBY_PLATFORM for compiling ext.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-01 01:17:41 +00:00
uema2 3ea7376bca *wince/time_wce.c (time): add zero check.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-30 23:05:39 +00:00
akr 77d7066abe * process.c (pst_inspect): describe stopped process "stopped".
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-30 02:31:24 +00:00
nobu 24639abab7 * test/runner.rb: glob for directories.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-30 00:31:59 +00:00
matz 13ac4447f6 * eval.c (rb_eval): while/until should not capture break unless
they are destination of the break.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-30 00:21:14 +00:00
aamine e377a12bff * lib/net/http.rb (finish): revert to 1.93.
* lib/net/pop.rb (finish): revert to 1.60.
* lib/net/smtp.rb (finish): revert to 1.67.
* lib/net/http.rb (do_start): ensure to close socket if failed to start session.
* lib/net/pop.rb (do_start): ditto.
* lib/net/smtp.rb (do_start): ditto.
* lib/net/smtp.rb: SMTP#started? wrongly returned false always.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-29 18:12:20 +00:00
aamine 2eeb39b3cf * test/ruby/test_iterator.rb: new test test_break__nested_loop[123].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-29 17:59:03 +00:00
aamine 8f52e49124 * ChangeLog: enhance log message.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4626 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-29 14:42:03 +00:00
aamine 819e8e6c82 * lib/net/http.rb (finish): does not raise IOError even if !started?, to allow duplicated #finish call.
* lib/net/pop.rb (finish): ditto.
* lib/net/smtp.rb (finish): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-29 14:39:54 +00:00
eban ccf1c21d3e * ChangeLog: add link to ruby-bugs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4624 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-29 10:19:47 +00:00
eban 3015c5f7cb * ext/win32ole/extconf.rb: add windows.h checking.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4623 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-29 10:08:20 +00:00
nahi 523cd7be9c * lib/logger.rb: check if the given logdevice object respond_to :write and
:close, not is_a? IO.  duck duck.

* test/logger/test_logger.rb: self IO.pipe reading/writing may be locked by the
  flood.  use tempfile.

* lib/wsdl/xmlSchema/data.rb: wrong constant reference.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-29 07:27:57 +00:00
aamine 14f9af6015 * ChangeLog: modify typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-29 07:16:02 +00:00
aamine a484962d95 * ChangeLog: small modify.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-29 07:13:45 +00:00
aamine 6d582bf22e * test/fileutils/test_fileutils.rb: clean up temporaly symlink. [ruby-dev:21420]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-29 07:11:50 +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
gotoyuzo b2cf59aa1c * lib/webrick/utils.rb (Utils::su): use setgid and setuid to
set real and effective IDs. and setup group access list by
  initgroups.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-28 17:50:52 +00:00
nahi d57fc5a489 * lib/xsd/charset.rb: XSD::Charset.is_ces did return always true under
$KCODE = "NONE" environment.  check added.

* test/xsd/test_xsd.rb: add tests for above fix.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-28 09:29:07 +00:00
nahi 6671baa96b * lib/soap/rpc/cgistub.rb: make logging severity threshold higher.
* lib/soap/rpc/standaloneServer.rb: defer WEBrick server start to give a change
  to reset logging severity threshold.

* test/soap/calc/test_*, test/soap/helloworld/test_helloworld.rb: run silent.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-27 07:03:29 +00:00
aamine eb4ace3c49 * ChangeLog: add link to ruby-dev.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-27 00:53:19 +00:00
aamine 0be9d09430 * test/fileutils/test_fileutils.rb: clear all errors on Windows.
* test/fileutils/test_nowrite.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-27 00:44:50 +00:00
nahi 11150ba747 * test/ruby/test_file.rb: new file. only asserts unlink-before-close behaviour
now.

* test/soap/marshal/test_digraph.rb: should close before unlink.
  unlink-before-close pattern is not needed here.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-26 20:00:03 +00:00
nahi 2e0b087b02 * test/soap/*, test/wsdl/*, test/xsd/*: move TestCase classes into each module
namespace.  TestMarshal in test/soap/marshal/test_marshal.rb crashed with
  test/ruby/test_marshal.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-26 18:34:41 +00:00
usa 39aafb4c78 * ext/socket/socket.c (ruby_connect): on win32, type of the 4th
argument of getsockopt is char *.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-26 16:35:07 +00:00
nobu dfe0aab04f * lib/resolv-replace.rb: 1.8 compliance. [ruby-talk:82946]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-26 09:35:44 +00:00
nahi e0741eb05f * test/ruby/test_marshal.rb: add test for ruby's objects.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4602 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-26 08:41:28 +00:00
nobu ac8ef7a5c8 * defines.h (flush_register_windows): use volatile only for gcc on
Solaris.  [ruby-dev:21403]

* lib/mkmf.rb (xsystem): use system directly to honor shell meta
  charaters.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-26 00:52:49 +00:00
nahi b4c805cc44 * lib/README: updated.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-25 15:10:46 +00:00
usa 3a9772f651 * ext/openssl/ossl.c (ossl_buf2str): fix type of 1st argument for
rb_protect.

	* ext/openssl/ossl_hmac.c (ossl_hmac_digest): should return meaningful
	  value.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-25 08:49:36 +00:00
ntalbott fb1f07049f * lib/ostruct.rb: Added OpenStruct#==.
* test/ostruct/test_ostruct.rb: Added.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-25 00:03:11 +00:00
matz 94bfebb3fa * error.c (rb_warn_m): should not warn if -W0 is specified.
[ruby-talk:82675]

* util.c (ruby_strtod): skip preceding zeros before counting
  digits in the mantissa. (ruby-bugs PR#1181)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-24 23:56:11 +00:00
nobu 5747a6c480 * ext/win32ole/win32ole.c, ext/openssl/ossl_pkey_dsa.c,
ext/openssl/ossl_pkey_rsa.c, ext/bigdecimal/bigdecimal.h: must
  not use C++ or C99 style comment yet.  (ruby-bugs:PR#1184)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-24 22:55:33 +00:00
eban 6ac122d762 * MANIFEST: add SOAP4R.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-24 15:23:56 +00:00
nahi db9445103c * lib/soap/* (29 files): SOAP4R added.
* lib/wsdl/* (42 files): WSDL4R added.

* lib/xsd/* (12 files): XSD4R added.

* test/soap/* (16 files): added.

* test/wsdl/* (2 files): added.

* test/xsd/* (3 files): added.

* sample/soap/* (27 files): added.

* sample/wsdl/* (13 files): added.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-24 15:18:44 +00:00
nobu fca2b319b5 * parse.y (str_xquote): do not prepend escapes in
backqoute literals.  [ruby-list:38409]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-24 07:42:06 +00:00
gotoyuzo 9cdd5fcb62 * lib/webrick/httpservlet/cgihandler.rb: conform to mswin32.
[ruby-talk:82735], [ruby-talk:82748], [ruby-talk:82818]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-23 17:14:39 +00:00
nahi 406fd7754e * lib/logger.rb: add Logger#<<(msg) for writing msg without any formatting.
* test/logger/test_logger.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-23 14:12:42 +00:00
eban 603e0b1f19 * MANIFEST: updated.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-22 12:29:33 +00:00
gotoyuzo 0645683e26 * configure.in (AC_CHECK_FUNCS): add setuid and setgid.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-22 10:25:24 +00:00
gotoyuzo ca8be43f0e * ext/openssl/ossl_ocsp.c (ossl_ocspreq_initialize): the argument
should be a String.

* ext/openssl/ossl_ocsp.c (ossl_ocspres_initialize): ditt.

* ext/openssl/ossl_x509attr.c (ossl_x509attr_initialize): ditto.

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

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


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-20 19:18:22 +00:00
nahi deb2caf4b5 * lib/logger.rb: typo fixed.
* test/logger/test_logger.rb: new file.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-20 02:51:06 +00:00
ntalbott 65fe176ea4 * test/testunit/*: Added.
* lib/test/unit.rb: Documentation update.

	* lib/test/unit/ui/console/testrunner.rb (TestRunner#initialize):
	  Ditto.

	* lib/test/unit.rb: Factored out an ObjectSpace collector.

	* lib/test/unit/collector/objectspace.rb: Ditto.

	* sample/testunit/*: Added.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-19 02:48:46 +00:00
gotoyuzo df7c89b442 * lib/webrick/log.rb (BasicLog#log): get rid of as ineffectual
condition.

* lib/webrick/log.rb (BasicLog#format): add "\n" to message.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-18 16:09:02 +00:00
matz 54fec448f5 * eval.c (proc_invoke): should push PROT_PCALL tag for orphans.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-18 13:57:53 +00:00
akr def3aa514a lib/pathname.rb: update document.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-18 11:35:38 +00:00
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