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

3295 Коммитов

Автор SHA1 Сообщение Дата
matz 970e90dd15 * enum.c (enum_each_entry): new method #each_entry to pack values
from yield into an array.

* lib/set.rb (Set#merge): use Enumerable#each_entry to implement
  Set compatible to 1.8 behavior.  [ruby-core:27985]

* lib/set.rb: replace is_a?(Enumerable) with respond_to?(:each)
  for duck typing.

* lib/set.rb (SortedSet#add): typo fixed.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-02 08:54:52 +00:00
nobu bafb881c1f * lib/delegate.rb (Delegator#marshal_dump): exclude
delegator-specific instance variables.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-02 02:14:00 +00:00
mame 9f714e35ec * lib/matrix.rb (Vector#each2): returns a self. [ruby-dev:40241]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-01 12:27:46 +00:00
mame 323d23c44b * lib/rexml/text.rb (REXML::Text#initialize): do Text.check only when
parent is specified, since Text.check may need doctype.  partially
  revert r26518.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-31 12:36:27 +00:00
mame a9770c8058 * lib/rexml/text.rb (REXML::Text#initialize): fix typo and a bug that
seems to be caused by refactoring.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-31 06:55:17 +00:00
mame 8129a8dfbd * lib/rexml/parent.rb (REXML::Parent#delete): return the deleted node
because the rdoc of REXML::Element#delete_element says it returns
  "the element that was removed."

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-31 06:55:06 +00:00
jeg2 ae0b606830 * A bug fix for deleting blank Table rows from Andy Hartford.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-31 05:34:17 +00:00
mame 6425b4ba56 * lib/rexml/document.rb (REXML::Document#add): fix duplicate XMLDecls
and bad DocTypes in REXML::Document.    (Bug #19058) [ruby-core:27979]
  based on the patch by Federico Builes.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-31 04:03:14 +00:00
mame bc7ae41e0f * lib/getoptlong.rb (set_options): ensure that the type of argument is
Array, restoring this check that was deleted at r10239.  This caused
  rubyspec error.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-29 13:53:57 +00:00
nobu 896d768290 * lib/mkmf.rb (create_makefile): use puts instead of print.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-29 03:22:55 +00:00
nobu a0248a2ba1 * lib/mkmf.rb (try_do): log no source when no developement env.
* lib/mkmf.rb (create_makefile): srcprefix always needs $(srcdir).

* lib/mkmf.rb (create_makefile): yield configuration if a block is
  given.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-29 02:09:51 +00:00
matz d9e84f2327 * lib/delegate.rb (Delegator#initialize_copy): use initialize_copy
instead of overriding clone/dup.  [ruby-dev:40221]
  it now always clones the target, it might cause incompatibility.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-28 16:47:21 +00:00
mame 266ee3bc7a * lib/cgi.rb: set autoload to CGI::HtmlExtension. [ruby-dev:40194]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-28 15:19:52 +00:00
mame 0aafb0b4b6 * lib/thread.rb (ConditionVariable#wait, signal, broadcast): return
self (for 1.8 compatibility).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-27 14:30:37 +00:00
keiju afc9fce01f * lib/matrix.rb: add exception Matrix::ErrOperationNotImplemented
[ruby-dev:40149].
 * lib/matrix.rb: change message of exception
   Matrix::ErrOperationNotDefined [ruby-dev:40150], [ruby-dev:40176].
 * lib/matrix.rb: add method Vector#/ [ruby-dev:40151].
 * lib/matrix.rb(Matrix::Scalar#+,-,/): delete meaningless when
   switch. [ruby-dev:40149]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-27 14:28:47 +00:00
mame a817c0b089 * lib/matrix.rb (determinant): fix name error.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-27 13:49:58 +00:00
seki e92661e647 * lib/drb/eq.rb: fix circular requrie in drb.
reported by akr. see [ruby-dev:40156] [ruby-core:27661]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-26 11:22:20 +00:00
akr a967f738c8 * lib/matrix.rb: suppress warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-25 22:08:29 +00:00
naruse ce35c0c650 * lib/rdoc/parser/ruby.rb: fix typo.
patched by Hal Brodigan [ruby-core:21536]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-23 15:34:47 +00:00
naruse ad38805490 * lib/rdoc/markup/to_html_crossref.rb: fix failure of the test.
[ruby-core:20564]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-23 15:11:20 +00:00
naruse eaa9ca7653 * lib/rdoc/generator/html.rb (RDoc::Generator::HTML#gen_into):
make the rdoc(generating html) run faster and use less memory.
  patch by Tetsu Soh [ruby-core:27656]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-23 14:16:04 +00:00
nobu 926fd9a939 * lib/resolv.rb (Resolv::Config.default_config_hash): return an
empty hash when resolv.conf is not available.  [ruby-core:27620]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-19 11:00:33 +00:00
nobu 5961543218 * lib/resolv.rb (Resolv::DNS::Config#lazy_initialize): fixed the
defaults of nameserver and port.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-19 10:58:28 +00:00
nobu f00951bb25 * lib/webrick/httpservlet/filehandler.rb (make_partial_content):
add bytes-unit.  [ruby-dev:40030]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-18 08:16:07 +00:00
nobu 67244d1a70 * lib/net/http.rb (Net::HTTPHeader#{content_range,range_length}):
use inclusive range same as the header representation.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-18 06:49:46 +00:00
naruse 5ed5439af4 Add call-seq for Net::HTTP.start.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-18 06:32:14 +00:00
nobu 12278f0b70 * lib/webrick/https.rb (parse_uri, meta_vars): suppress warnings.
* lib/webrick/ssl.rb (listen): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26334 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-17 05:31:52 +00:00
nobu bb6e6903ca * ext/iconv/iconv.c (iconv_convert): suppress a warning.
* lib/mkmf.rb (check_signedness): new method.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-17 05:23:25 +00:00
nobu 37db97c0e1 * lib/mkmf.rb (have_header, create_header): use String#tr_cpp.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-17 05:18:03 +00:00
naruse 19f6839c0c * lib/shell/command-processor.rb: fix typo by Sho Hashimoto.
reported and patched at [ruby-dev:40058] [Bug #2599]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-12 15:35:08 +00:00
kou 06dfb68d54 * lib/rss/maker/base.rb, test/rss/test_maker_0.9.rb:
accept any time format in maker. [ruby-core:26923]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-12 14:52:11 +00:00
nobu 3b42acc8c1 * lib/net/http.rb (Net::HTTP.start): options may not be given.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-12 07:48:48 +00:00
naruse b5227ae183 * lib/net/http.rb (Net::HTTP#start): add hash argument to
set ssl related options. when use_ssl is set default value
  of verify_mode is OpenSSL::SSL::VERIFY_PEER. [ruby-dev:40003]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-12 05:56:28 +00:00
akr 853dd6cabe * prelude.rb (require_relative): use File.realpath. [ruby-dev:40040]
* include/ruby/intern.h: declare rb_dir_getwd.

* dir.c (rb_dir_getwd): copied from dir_s_getwd to export.
  (dir_s_getwd): use rb_dir_getwd.

* file.c (rb_file_s_realpath): new method File.realpath.
  (rb_file_s_realdirpath): new method File.realdirpath.

* lib/pathname.rb (Pathname#realpath): use File.realpath.
  (Pathname#realdirpath): use File.realdirpath.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-12 00:32:22 +00:00
nobu 6dcd551a4b * lib/webrick/accesslog.rb (WEBrick::AccessLog#format): fixed typo.
* lib/webrick/httpstatus.rb (WEBrick::HTTPStatus::Status#initialize):
  accept 0 or more arguments.  [ruby-dev:40021]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26281 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-11 04:30:37 +00:00
shyouhei 73cd7b6697 * lib/webrick/accesslog.rb : Escape needed.
* lib/webrick/httpstatus.rb : ditto.

	* lib/webrick/httprequest.rb : ditto.

	* lib/webrick/httputils.rb : ditto.

	* test/webrick/test_cgi.rb (TestWEBrickCGI::test_bad_): Test for it.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-10 09:33:47 +00:00
nobu 655cb34f17 * lib/matrix.rb (Matrix#inverse_from): use #quo. backported r9490.
* lib/matrix.rb (Matrix#determinant): ditto.  [ruby-core:27507]

* lib/matrix.rb (Matrix#rank): ditto.

* lib/matrix.rb (Matrix::Scalar#initialize): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-09 20:35:28 +00:00
nobu 01629be729 * lib/mkmf.rb (configuration): needs ARCH_FLAG.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-09 19:41:22 +00:00
naruse e0cdab5fff * lib/net/http, lib/net/https: move content from net/https to
net/http. [ruby-dev:39986]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-08 12:17:15 +00:00
ryan 06925a0952 Imported minitest 1.5.0 r5596
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-06 22:58:07 +00:00
yugui 295bc2fe25 removes the dtrace support. reverts r26239, r26238 and r26235.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-05 05:59:23 +00:00
yugui 72b199940d * trace.h: new file. wraps tracing mechanisms.
* defs/dtrace.d: new file. defined a dtrace provider "ruby".

* include/ruby/ruby.h (LIKELY): moved from vm.c.
  (UNLIKELY): ditto.
  (OBJSETUP): probe "object-create".
  (RUBY_EVENT_RESCUE): new event.

* vm_exec.c (DEBUG_ENTER_INSN): embeded a probe insn-entry into it.
  (DEBUG_END_INSN): insn-return.

* vm.c (LIKELY): moved into ruby.h.
  (UNLIKELY): ditto.
  (Init_BareVM): embeded a probe "raise" into it.

* variable.c (rb_class2name_without_alloc): new utility function.

* tool/rbinstall.rb (install?(:ext, :arch, :'ext-arch')): installs 
  dtrace.d if necessary.

* thread_pthread.c (add_signal_thread_list): probe "raise".
  (rb_thread_create_timer_thread): ditto.

* thread.c (rb_thread_schedule_rec): probes "thread-enter" and
  "thread-leave",
  (thread_start_func_2): ditto.
  (thread_cleanup_func): probe "thread-term"

* lib/mkmf.rb: supports dtrace postprocessor on making an extension.

* iseq.c (rb_vm_insn_name): new utility function.
  (rb_vm_insn_len): ditto.

* insns.def (hook): probes "method-etnry", "method-return", "line",
  and "rescue".

* compile.c (iseq_compile_each): adds a trace op for "rescue" probe.

* gc.c (garbage_collect): probes "gc-begin" and "gc-end".
  (obj_free): probe "object-free"
  (garbage_collect_with_gvl): probe "raise"
  (negative_size_allocation_error): ditto.
  (rb_memerror): ditto.

* eval.c (rb_rescue2): probe "rescue"
  (rb_longjmp): probe "raise"

* ext/probe/probe.c: new extension for application defined probes.

* ext/probe/extconf.rb: ditto.

* configure.in (--with-tracing-model): new option to choose a tracing
  mechanism.
  (DTRACE): new substitution. name of dtrace(1).
  (RUBY_TRACING_MODEL): new substitution.
  (DTRACE_OBJ): ditto.
  (MINIDTRACE_OBJ): ditto.
  (GOLFDTRACE_OBJ): ditto.
  (LIBRUBY_DTRACE_OBJ): ditto.
  (RUBY_DTRACE_POSTPROCESS): new macro. checks whether the dtrace on 
  the system needs postprocessing.
  (RUBY_DTRACE_BSD_BROKEN): new macro. checks whether the dtrace
  supports USDT.

* Makefile.in: 
  (DTRACE): new variable. name of dtrace(1).
  (TRACING_MODEL): new variable. name of the chosen tracing mechanism.
  (DTRACE_OBJ): same as the one in configure.in.
  (MINIDTRACE_OBJ): ditto.
  (GOLFDTRACE_OBJ): ditto.
  (LIBRUBY_DTRACE_OBJ): ditto.
  (CPPOUTFILE): new substitution. necessary for generating dtrace.d
  (trace_none.h): new target for TRACING_MODEL=none
  (RUBY_H_INCLUDES): appended a header for tracing.
  (distclean-local): also removes preprocessed version of dtrace.d
  ($(LIBRUBY_A)): needs $(LIBRUBY_DTRACE_OBJ) if dtrace needs 
  postprocessing.
  ($(PROGRAM)): ditto.
  (golf): ditto.
  (miniruby): ditto.
  ($(arch_hdrdir)/ruby/dtrace.d): new target. preprocessed verson 
  of defs/dtrace.d. generated if necessary.
  ($(arch_hdrdir)/ruby/trace_dtrace.h): new target.
  definition of probes.
  ($(LIBRUBY_DTRACE_OBJ)): new target. generated if dtrace needs 
  postprocessing.
  ($(DTRACE_OBJ)): ditto.
  ($(MINIDTRACE_OBJ)): ditto.
  ($(GOLFDTRACE_OBJ)): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-03 15:36:17 +00:00
yugui 0e8fae89ab * lib/rexml/text.rb: String no longer has #each.
Patch by Mitsutaka Mimura (takkanm). [ruby-dev:39949].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-03 06:37:40 +00:00
akr 2a26264064 rdoc update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-02 18:10:47 +00:00
akr 50b8893d56 * lib/resolv.rb (Resolv::DNS::Message::MessageDecoder#inspect):
implemented.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-02 16:31:00 +00:00
akr 1dc1bf28ab * lib/resolv.rb (Resolv::DNS#initialize): new option :nameserver_port.
(Resolv::DNS#each_resource): pass port number.
  (Resolv::DNS#make_requester): ditto.
  (Resolv::DNS::Config#lazy_initialize): initialize @nameserver_port
  instead of @nameserver.
  (Resolv::DNS::Config#single?): return port number addition to the
  nameserver.
  (Resolv::DNS::Config#generate_timeouts): use @nameserver_port.
  (Resolv::DNS::Config#resolv): yield port number.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-02 07:03:24 +00:00
naruse 7aab2aad6e * lib/uri/common.rb (initialize_regexp): allow leading
and trailing white space, and forbid extra characters
  on another lines. [ruby-core:26223]
  RFC 3986  Appendix C.  Delimiting a URI in Context
  draft-duerst-iri-bis-07  7.2.  Web Address processing

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-01 16:00:46 +00:00
naruse 17ff65205c * lib/uri/generic.rb (URI#normalize!): normalize case of
scheme. [ruby-core:27309]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-01 16:00:37 +00:00
akr c0b4e90f08 * tool/mkconfig.rb: generate RbConfig.ruby in rbconfig.rb.
* lib/webrick/httpservlet/cgihandler.rb: use RbConfig.ruby.

* test/ruby/envutil.rb: ditto.

* benchmark/report.rb: ditto.

* benchmark/runc.rb: ditto.

* tool/eval.rb: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-31 15:00:04 +00:00
nobu 499bf746da * gem_prelude.rb (push_all_highest_version_gems_on_load_path):
simplified.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-30 08:59:16 +00:00