* enum.c (enum_count):  Enumerable#count no longer uses #size when
  counting elements.  Patch by Nobuhiro IMAI.  [ruby-trunk - Bug #6473]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/-ext-/test_printf.rb: tests for [Feature #5896].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm.c: refactoring backtrace related funcitons.
  (1) unify similar functions (rb_backtrace_each() and
  backtrace_object()).  backtrace_each() is a unified function.
  variation:
  a) backtrace_object(): create backtrace object.
  b) vm_backtrace_str_ary(): create bt as an array of string.
  c) vm_backtrace_print(): print backtrace to specified file.
  d) rb_backtrace_print_as_bugreport(): print backtrace on
  bugreport style.
  (2) remove rb_backtrace_each().  Use backtrace_each() instead.
  (3) chang the type of lev parameter to size_t.
  a) lev == 0 means current frame (exception, etc use it).
  b) lev == 1 means upper frame (caller(0) use it).
* vm_core.h, vm_dump.c, vm_eval.c: ditto.
* vm.c (backtrace_object(), vm_backtrace_str_ary()): fix to return a
  correct size of caller(lev) array.
  Let n be a "caller(0).size" then ln as caller(lev).size should be
  (n - lev).  However, the previous implementation returns a wrong
  size array (ln > n - lev).  [ruby-dev:45673]
* test/ruby/test_backtrace.rb: add tests for backtrace.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* properties.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35788 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* trunk/ext/-test-/printf/printf.c: change function names because of
  conflict with msvcrt.  fixed build error of mswin.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm.c (oldbt_init, vm_backtrace_str_ary): arg->data should
  be initialized before calling `backtrace_each()'.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_eval.c (rb_f_caller): caller() method accepts second optional
  argument `n' which specify how many frames should return.
  For example, `caller(0, 1)' returns only one frame information
  which calls caller() method.  If there are less than n frame
  information, then all frame information are returned.  If n is 0,
  then always return [].
  This fix is part of [ruby-dev:42345] [Ruby 1.9-Feature#3917].
  However, performance and features are not enough.
  RDoc is also not available.
* test/ruby/test_backtrace.rb: add a test for above.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
vm.c: adjust argument types

* vm.c (backtrace_each, bt_init, oldbt_init): adjust argument types.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/openssl/ossl_ssl.c: Revert r35583
* test/openssl/test_ssl.rb: Handle ECONNRESET in code instead to avoid
the test failing in Ruby CI [1]
	
[1] http://u64.rubyci.org/~chkbuild/ruby-trunk/log/20120507T190102Z.log.html.gz#test-all


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/openssl/test_ssl.rb: Clarify the intention of errors to be
  expected. Two errors are possible when connection is refused due
  to a protocol version that was explicitly disallowed,
  OpenSSL::SSL::SSLError or Errno::ECONNRESET, depending on the
  OpenSSL version in use.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/openssl/ossl_ssl.c: Allow disabling client-side renegotiation.
* test/openssl/test_ssl.rb: Simple tests for this.

  Client-side renegotiation is still considered problematic, even
  when used in the context of secure renegotiation (RI, RFC 5746).
  The changes allow users to either completely disable client
  renegotiation on the server, or to specify a maximum number of
  handshakes allowed in total. The number of total handshakes is
  counted in a callback set as SSL_set_info_callback. If the
  maximum number of handshakes is exceeded an error will be raised
  We do not support renegotiation in the OpenSSL extension, therefore
  this feature can only be tested externally.
  The feature is opt-in, the default setting will be to allow
  unlimited client renegotiation, as was the case before.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 2012-05-26

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm.c (rb_frame_info_t): keep previous ISEQ frame info for CFUNC
  frame info.  And fix to cache a calculated line_no of ISEQ frame
  info.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm.c (frame_info_to_str): add `break'.
* vm.c (backtrace_object): remove lev and n parameter.
  backtrace_object always returns all of backtrace information.
* vm.c (rb_backtrace_to_str_ary): fix to use backtrace_object().
  This change improve performance of caller(lev, n).
* benchmark/bm_vm3_backtrace.rb: added to check above improvement.
  FYI: measurement on my laptop, 1.9.3p229 needs 5.125 sec,
  and current trunk only needs 0.299sec.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm.c (RubyVM::FrameInfo): add a class to access each frame
  information.  You don't need to parse strings from caller().
  FrameInfo has the following methods:
  FrameInfo#name: method name, class name, etc with decorations.
  FrameInfo#basename: name without decorations.
  FrameInfo#line_no: line number.
  FrameInfo#filename: file name.
  FrameInfo#filepath: full filepath.
  FrameInfo#iseq: iseq if it is iseq frame (defined by ruby script)
  FrameInfo#to_s: return caller() method style string.
  RubyVM::FrameInfoFrameInfo.caller(n, lev) returns array of
  FrameInfo objects.  The name "RubyVM::FrameInfoFrameInfo.caller"
  is long and ambiguous (same as caller() method), we need to change
  the name before Ruby 2.0 release.
  Good names or comments are welcome.
* test/ruby/test_backtrace.rb: add a test for above change.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* NEWS: add Kernel#caller's second argument.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ChangeLog: fix typos

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35803 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_backtrace.rb (test_caller_lev):
  decreaze recursion size.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
test/ruby/test_file.rb: fix for UNC

* test/ruby/test_file.rb (test_realpath, test_realdirpath): fix for
  UNC enabled platforms.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
file.c: fix for UNC

* file.c (realpath_rec): UNC prefix does not end with path separator,
  so new separator is needed after it.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e