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

26354 Коммитов

Автор SHA1 Сообщение Дата
ko1 06653c1933 * benchmark/driver.rb: fix to continue benchmarks when
an error is occurred.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-27 04:35:11 +00:00
nobu 2d8b8b4d3e fix operator precedence
* lib/test/unit.rb (Test::Unit::Runner#_prepare_run): fix operator
  precedence, so that platform and TERM should be counted.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-27 02:27:53 +00:00
nobu a000c52b83 * untabified.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-27 02:23:14 +00:00
tadf 9f698ff1d5 modified test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-27 01:05:31 +00:00
tadf 83d8d057c2 * ext/date/date_strftime.c: allows %Ok and %Ol.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-27 01:04:41 +00:00
tadf 6ba96bbe4e * ext/date/date_core.c: modified doc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-27 00:30:33 +00:00
svn 9a6a94f770 * 2012-05-27
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-26 18:18:49 +00:00
nagachika 18454e6f10 * ChangeLog: fix a typo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-26 18:18:45 +00:00
tadf 76547ea75f * ext/date/date_core.c: added description.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-26 10:05:25 +00:00
tadf 43e8bf0c27 re-modified
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-26 09:21:21 +00:00
tadf 2199c85dd6 * ext/date/date_strftime.c: reduced the code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-26 09:16:26 +00:00
tadf 0976f31200 * time.c: modified doc.
* ext/date/date_core.c: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-26 09:10:42 +00:00
ko1 ec187ff847 * vm.c (backtrace_*): change type of lev and n from size_t to int.
Also set type of rb_backtrace_t#backtrace_size to int.
  A patch from nobu.
* vm_eval.c: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-26 08:08:16 +00:00
nobu 5212b7fb52 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
2012-05-26 07:26:36 +00:00
nobu 62bab7fc22 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
2012-05-26 07:24:59 +00:00
ko1 9c3d8bb0f2 * 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
2012-05-26 06:31:31 +00:00
ko1 a28b100f1c ChangeLog: fix typos
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35803 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-26 05:03:33 +00:00
ko1 ca433168ba * NEWS: add Kernel#caller's second argument.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-26 04:51:32 +00:00
ko1 4f54d4710e * 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
2012-05-26 04:49:23 +00:00
ko1 fbf531c4a2 * 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
2012-05-26 03:25:15 +00:00
ko1 6d597718cf * 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
2012-05-26 02:10:37 +00:00
svn 2240dc2ed3 * 2012-05-26
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-26 00:56:37 +00:00
emboss 50ba64ab87 * 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 00:56:33 +00:00
emboss 6f5582a2ae * 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
2012-05-25 14:44:15 +00:00
emboss 913827b6af * 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
2012-05-25 13:24:47 +00:00
nobu 655a20ea9d 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
2012-05-25 12:14:48 +00:00
ko1 4258db7954 * 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
2012-05-25 11:01:01 +00:00
ko1 a5f190615e * 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
2012-05-25 08:07:16 +00:00
usa 67075af600 * 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
2012-05-25 07:13:03 +00:00
nobu 9a66f6f07e * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35788 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-25 04:53:54 +00:00
ko1 1f3142a447 * 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
2012-05-25 04:50:10 +00:00
nobu 26f96fe1ce * 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
2012-05-25 02:20:36 +00:00
drbrain 38f0dd0aba * 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
2012-05-24 23:51:56 +00:00
nobu 80aaa3ef6c sprintf.c: inspect by plus
* sprintf.c (ruby__sfvextra): [EXPERIMENTAL] use inspect instead of
  to_s if plus flag is given.
* vsnprintf.c (BSD_vfprintf): pass sign flag.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-24 16:15:42 +00:00
svn 8996556b05 * 2012-05-25
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-24 15:37:29 +00:00
nobu d176c4ee99 Bug #5348
* test/rubygems/test_gem_indexer.rb (setup, teardown): save @tempdir
  to remove it properly.  [Bug #5348]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-24 15:37:25 +00:00
nobu ce8e2d5404 Feature #5896
* vsnprintf.c (BSD_vfprintf): [EXPERIMENTAL] object representation in
  rb_enc_vsprintf(). [Feature #5896]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-24 14:36:54 +00:00
nobu 60e8cd2e68 vm.c: marshal compatibility
* vm.c (Init_VM): fix marshal compatibility of backtrace.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-24 14:01:41 +00:00
nobu ab42fe2a41 vm.c: fix typo
* vm.c (Init_VM): fix typo.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-24 14:01:39 +00:00
nobu e1c652bbaf vm.c: rb_typeddata_is_kind_of
* vm.c (rb_backtrace_p): use rb_typeddata_is_kind_of().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-24 14:01:37 +00:00
nobu a4a922e9bc vm_eval.c: fix types
* vm_eval.c (rb_backtrace_struct, backtreace_collect): use size_t
  instead of int to get rid of overflow.

* vm_eval.c (backtrace_object, vm_backtrace_each): ditto, use
  ptrdiff_t.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-24 14:01:34 +00:00
nobu 04a03b34c3 vm.c: suppress 64-to-32 warnings
* vm.c (backtrace_object): suppress 64-to-32 warnings.  should adjust
  types.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-24 09:51:20 +00:00
ko1 d5893b91fa * vm_method.c (rb_method_defined_by): removed.
nobu pointed out that rb_method_basic_definition_p() is enough
  for last commit.
* error.c, eval_error.c: change for above.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-24 06:36:44 +00:00
ko1 3dcebce523 * vm.c: add RubyVM::Backtrace object (btobj).
Backtrace information contains an array consists of location
  information for each frames by string.
  RubyVM::Backtrace object is lightweight backtrace information,
  which contains complete information to generate traditional style
  backtrace (an array of strings) with faster generation.
  If someone accesses to backtrace information via
  Exception#backtrace, then convert a RubyVM::Backtrace object to
  traditonal style backtrace.
  This change causes incompatibility on marshal dumpped binary
  of Exception.  If you have any trouble on it, please tell us
  before Ruby 2.0 release.
  Note that RubyVM::Backtrace object should not expose Ruby level.
* error.c, eval.c, vm_eval.c: ditto.
* internal.h: ditto.
* eval_error.c: fix to skip "set_backtrace" method invocation in
  creating an exception object if it call a normal set_backtrace
  method (defined by core).
* test/ruby/test_settracefunc.rb: fix for above change.
* vm_method.c (rb_method_defined_by): added.  This function
  checks that the given object responds with the given method
  by the given cfunc.
* benchmark/bm_vm2_raise1.rb, benchmark/bm_vm2_raise2.rb:
  add to measure exception creation speed. raise1 create
  exception objects from shallow stack frame.  raise2 create
  exception objects from deep stack frame.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-24 06:09:23 +00:00
naruse bd5c7507ec Fix wrong filename: enc/shift_jis.c -> string.c (r35724).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-24 04:05:09 +00:00
svn 73f3804789 * 2012-05-24
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-24 03:07:54 +00:00
nobu 3cc5ddcac1 Bug #6487
* io.c (io_strip_bom): check EOF.  [Bug #6487][ruby-core:45203]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-24 03:07:49 +00:00
drbrain c427f44f10 Ignore extconf.rb generated mkmf.log
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-23 20:04:39 +00:00
naruse 3ba0abdb15 * lib/net/http/header.rb (Net::HTTPHeader#range): fix broken parser of
HTTP Range request. Old one can't parse invalid specs and multiple
  specs correctly.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-23 13:09:26 +00:00
nobu b0dd250dc9 use RB_TYPE_P() instead of comparison of TYPE()
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-23 07:13:21 +00:00