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

7243 Коммитов

Автор SHA1 Сообщение Дата
nobu 1a2b90d5e6 vm.c: rb_vm_env_local_variables
* vm.c (rb_vm_env_local_variables): returns array of local
  variable name symbols in the environment by envval.
* proc.c (bind_local_variables): use rb_vm_env_local_variables.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-01 17:57:37 +00:00
nobu 43ba2c01e7 proc.c: Binding#receiver
* proc.c (bind_receiver): new method to return the bound receiver
  of the binding object.  [ruby-dev:47613] [Feature #8779]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-01 17:24:02 +00:00
nobu 02c391a1c9 proc.c: fix infinite loop
* proc.c (bind_local_variables): update env from envval for each
  iterations.  [ruby-dev:48351] [Bug #10001]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-01 17:14:48 +00:00
nobu bc1fafaea3 test_proc.rb: test_local_variables
* test/ruby/test_proc.rb (test_local_variables): missing test for
  Binding#local_variables.  [Feature #8773]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-01 17:14:22 +00:00
nobu d34c478634 test_proc.rb: test_local_variables_in_other_context
* test/ruby/test_proc.rb (test_local_variables_in_other_context):
  move from test_variable.rb, this is a test for the method of
  Binding, not of Kernel.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-01 17:14:19 +00:00
nobu 71a1a3b8c5 test_gem_package_tar_reader_entry.rb: close temporary files
* test/rubygems/test_gem_package_tar_reader_entry.rb (teardown):
  close temporary files under util_entry to fix leaked tempfiles.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-01 16:18:43 +00:00
nobu 8606377de4 test_gem_remote_fetcher.rb: stop SSL server
* test/rubygems/test_gem_remote_fetcher.rb (stop_servers): stop
  SSL server before shutdown its thread.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-01 16:18:41 +00:00
nobu 05bb854931 test_gem_remote_fetcher.rb: fix leaked threads
* test/rubygems/test_gem_remote_fetcher.rb (stop_servers): kill
  server threads to fix leaked threads.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-01 08:20:39 +00:00
knu e2e4ac3a8f Digest::HMAC is finally removed as previously noticed. [fix GH-648]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-01 07:21:08 +00:00
naruse 91dfb379ea add timeout
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-01 03:16:33 +00:00
naruse ab606d8f11 exception must make process stop
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-01 00:40:34 +00:00
naruse 7973ff4fe6 show if parallel test-all fails to Marshal.load
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-30 19:28:58 +00:00
naruse b105cbc809 suppress warnings: assigned but unused variable
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-30 10:11:02 +00:00
ko1 4369806ff0 * gc.c: support `USE_RGENGC == 0'.
* test/ruby/test_gc.rb: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-30 06:14:37 +00:00
akr b9faaf6a55 * ext/pathname/pathname.c (path_birthtime): New method,
Pathname#birthtime.
  Proposed by Kazuhiro NISHIYAMA.  [ruby-dev:48232] [Feature #9857]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46602 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-28 13:46:02 +00:00
akr 7361eb9462 inspect IO objects before closed IO object test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-28 12:51:48 +00:00
akr 1c58954cec Suppress double dots.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-28 06:08:24 +00:00
nobu f28a12734b test_env.rb: relax limits
* test/ruby/test_env.rb (test_memory_leak_{aset,select,shift}):
  increase rehearsals and memory leak limits.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-28 05:34:50 +00:00
nobu fd4df3be5c eval.c: no overwrite SystemStackError backtrace
* eval.c (setup_exception): should not overwrite SystemStackError
  backtrace if set already.  [ruby-core:63377] [Feature #6216]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-28 04:58:53 +00:00
nobu 3ff85b795a eval.c: no method calls at stack overflow
* eval.c (setup_exception): get rid of method calls before raising
  stack overflow, not to cause stack overflow again.
* defs/id.def: add IDs for backtraces.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-28 04:58:25 +00:00
naruse e63ab5d3ad * lib/uri/mailto.rb: update to latest specs, RFC 6068 and HTML5.
* lib/uri/mailto.rb (HEADER_PATTERN): removed.

* lib/uri/mailto.rb (HEADER_REGEXP): use RFC 6068 hfields.

* lib/uri/mailto.rb (EMAIL_REGEXP): use HTML5 email regexp.

* lib/uri/mailto.rb (URI::MailTo.build): support multiple to addresses.

* lib/uri/mailto.rb (URI::MailTo#initialize): Support multiple to
  addresses. Don't check with regexp, only split.

* lib/uri/mailto.rb (URI::MailTo#check_to): verify by matching
  URI path-rootless and HTML5 email regexp with unescaped one.

* lib/uri/mailto.rb (URI::MailTo#check_headers): verify only by
  HEADER_REGEXP.

* lib/uri/mailto.rb (URI::MailTo#set_headers): don't check by
  HEADER_REGEXP, only split it.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-27 19:26:43 +00:00
nobu 9a4f9f3424 reapply r46568 "assertions.rb: refine message"
`exception` is an expected exception class, not the raised instance,
so the result message cannot have any backtraces.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-27 15:44:20 +00:00
nobu 8de619bee5 test_env.rb: rehearsal
* test/ruby/test_env.rb (test_memory_leak_{aset,select,shift}):
  have a rehearsal before the main loop.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-27 14:34:31 +00:00
naruse aac7837c76 Revert r46568 "assertions.rb: refine message"
Don't inspect exceptions without backtrace omission for SystemStackError.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-27 06:28:18 +00:00
naruse 36a043a93a suppress warnings: URI.regexp is obsolete
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-27 06:25:44 +00:00
nobu 68bc5ba1b6 hash.c: fix memory leak
* hash.c (env_shift): fix memory leak on Windows, free environment
  strings block always.  [ruby-dev:48332] [Bug #9983]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-26 20:33:34 +00:00
nobu cfa7b2283b sprintf.c: unnumbered asterisk with numbered argument
* sprintf.c (GETASTER): should not use the numbered argument to be
  formatted, raise ArgumentError instead.
  [ruby-dev:48330] [Bug #9982]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-26 18:41:57 +00:00
nobu 545165770b assertions.rb: refine message
* test/lib/test/unit/assertions.rb (assert_raise_with_message):
  refine default message for the exception to be raised.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-26 18:25:13 +00:00
nobu 57d6cb4af9 sprintf.c: remove extra parentheses
* sprintf.c (GETASTER): remove extra parentheses from the second
  argument so that the error message does not contain them.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-26 13:30:08 +00:00
hsbt 767358108e * test/with_different_ofs.rb: move into test library directory.
* test/csv/base.rb: fix require path for with_different_ofs.rb.
* test/digest/test_digest_extend.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-26 09:27:22 +00:00
hsbt 4af87bd672 * test/profile_test_all.rb: move into test library directory.
* test/runner.rb: fix require path for profile_test_all.rb.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-26 09:16:56 +00:00
hsbt 46724873b0 Revert "Revert "* lib/yaml.rb: Remove Psych::EngineManager [Bug #8344]""
syck-1.0.3 gem support this imcompatible changes.

This reverts commit r46102

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-26 02:52:46 +00:00
nobu 78c763a25c hash.c: fix memory leak
* hash.c (env_select): fix memory leak and crash on Windows, make
  keys array first instead of iterating on envrion directly.
  [ruby-dev:48325] [Bug #9978]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-25 23:28:04 +00:00
nobu f96f013955 eval_error.c: newline always
* eval_error.c (error_print): put a newline after an anonymous
  exception class name.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-25 17:45:10 +00:00
nobu 4198f1473a hash.c: fix memory leak
* hash.c (ruby_setenv): fix memory leak on Windows, free
  environment strings block after check for the size.
  [ruby-dev:48323] [Bug #9977]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-25 13:31:34 +00:00
nobu 51a1c68bc7 hash.c: prohibit tainted strings
* hash.c (env_aset, env_has_key, env_assoc, env_has_value),
  (env_rassoc, env_key): prohibit tainted strings if $SAFE is
  non-zero.  [Bug #9976]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-25 01:20:01 +00:00
naruse a054854324 Revert "* lib/uri/mailto.rb: support RFC6068."
to fix mailto URI syntax

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-24 02:58:45 +00:00
nobu 5c9bc9f8e1 hash.c: frozen PATH env
* hash.c (env_path_str_new): make PATH environment variable
  string, to be frozen.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-24 01:50:09 +00:00
nobu 195bee47b7 * test/uri/test_common.rb: use `require_relative` for parallel test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-23 21:57:23 +00:00
naruse a672789739 * lib/uri/mailto.rb: support RFC6068.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-23 20:01:27 +00:00
headius 3f103ad0e9 * test/openssl/test_509cert.rb: force sorted order for order-
sensitive test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-23 18:59:07 +00:00
naruse e02eb253e7 * lib/uri/generic.rb (check_port): allow strings for port= as
described in rdoc.

* lib/uri/rfc3986_parser.rb (regexp): implementation detail of above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-23 03:18:51 +00:00
naruse 66aba8cca2 suppress warnings of URI.extract
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-23 03:18:17 +00:00
nobu 053759edfc Backtrace for SystemStackError
* eval.c (setup_exception): set backtrace in system stack error
  other than the pre-allocated sysstack_error.  [Feature #6216]
* proc.c (Init_Proc): freeze the pre-allocated sysstack_error.
* vm_insnhelper.c (vm_stackoverflow): raise new instance for each
  times without calling any methods to keep the backtrace with no
  further stack overflow.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-23 02:35:18 +00:00
naruse bb83f32dc3 support RFC3986 [Feature #2542]
* lib/uri/common.rb (URI::REGEXP): move to lib/uri/rfc2396_parser.rb.

* lib/uri/common.rb (URI::Parser): ditto.

* lib/uri/common.rb (URI.split): use RFC3986_Parser.

* lib/uri/common.rb (URI.parse): ditto.

* lib/uri/common.rb (URI.join): ditto.

* lib/uri/common.rb (URI.extract): deprecated.

* lib/uri/common.rb (URI.regexp): ditto.

* lib/uri/rfc2396_parser.rb: added.

* lib/uri/rfc3986_parser.rb: added.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-22 00:22:19 +00:00
naruse f977ebb1c9 suppress warnings: using default DH parameters.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-22 00:21:37 +00:00
ko1 2aa6f9c2b7 * test/lib/tracepointchecker.rb: add to check TracePoint healthiness.
* test/runner.rb: use it.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-20 08:22:09 +00:00
nobu 90a9db6e6c test_regexp.rb: split test_once
* test/ruby/test_regexp.rb (test_once): split for each cases than
  separating by comments.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-20 06:47:37 +00:00
nobu f9a2d6b9d9 test_regexp.rb: assert prefix
* test/ruby/test_regexp.rb: rename and prefix `assert_` to show
  caller method names in backtrace.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-20 06:47:10 +00:00
nobu edbe0c305a test_optimization.rb: redefine separately
* test/ruby/test_optimization.rb (assert_redefine_method):
  redefine optimized methods in separate processes.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-20 02:47:14 +00:00