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

6850 Коммитов

Автор SHA1 Сообщение Дата
nobu 3935f2ae6e marshal.c: undumpable hidden objects
* marshal.c (w_object): internal objects are not dumpable.
  [ruby-core:61677] [Bug #9674]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-26 02:20:52 +00:00
nobu 1dd527012b thread.c: undumpable
* ext/thread/thread.c (undumpable): ConditionVariable and Queue
  are not dumpable.  [ruby-core:61677] [Bug #9674]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-26 02:20:26 +00:00
nobu dcd1e5e5c2 parse.y: required kwarg without parentheses
* parse.y (parser_yylex): only a newline after label should be
  significant.  [ruby-core:61658] [Bug #9669]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-25 14:57:18 +00:00
kazu 6df5f314ac remove unnecessary unshift
* ext/pathname/lib/pathname.rb (Pathname#join): remove unnecessary unshift.
* test/pathname/test_pathname.rb (TestPathname#test_join): add tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-25 14:42:36 +00:00
usa 602a9c1416 * test/ruby/test_time.rb: extended the timeout span and reduce the loop count.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-25 07:57:35 +00:00
nobu d7442c32df parse.y: required kwarg without parentheses
* parse.y (lex_state_e, parser_params, f_arglist, parser_yylex):
  separate EXPR_LABELARG from EXPR_BEG and let newline significant,
  so that required keyword argument can place at the end of
  argument list without parentheses.  [ruby-core:61658] [Bug #9669]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-25 07:47:37 +00:00
usa 69c80f18e3 * test/ruby/test_time.rb: use portable time zone. see [ruby-core:61671] [Bug #9652]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-25 06:55:04 +00:00
nobu 0331e42be3 parse.y: freeze filename
* parse.y (ripper_initialize): filename can not be modified.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-24 13:19:57 +00:00
nobu 87108634e1 test_time.rb: arguments order
* test/ruby/test_time.rb (TestTime#test_marshal_zone_gc): fix
  the order of arguments.  expected value should come first.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-24 08:26:09 +00:00
naruse f664ffb5a0 Asia/Tokyo is more portable value for ENV["TZ"] [Bug #9652]
FreeBSD doesn't accept "Japan".

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-24 08:02:54 +00:00
nobu bedc6fdf88 vm_method.c: check if klass is 0
* vm_method.c (rb_method_entry_get_without_cache): me->klass is 0
  for a method aliased in a module.  [ruby-core:61636] [Bug #9663]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-23 02:03:51 +00:00
nobu af1da410ca cgi/util.rb: use alias
* lib/cgi/util.rb (escape_html, unescape_html): make synonyms
  aliases instead of wrapper methods.
* lib/cgi/util.rb (escape_element, unescape_element): ditto.
  [Fixes GH-573]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-21 21:46:17 +00:00
nobu 993fd53616 test_cgi_util.rb: escape for ruby-mode.el
* test/cgi/test_cgi_util.rb (CGIUtilTest): escape '<' not
  ruby-mode.el to confuse with here documents.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-21 21:46:04 +00:00
jeg2 3fb752a921 * lib/csv.rb: Fixed a broken regular expression that was causing
CSV to miss escaping some special meaning characters when used
  in parsing.
  Reported by David Unric
  [ruby-core:54986] [Bug #8405]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-20 14:38:21 +00:00
nobu 3453070fbc vm_method.c: fix infinite recursion
* vm_method.c (rb_method_entry_get_without_cache): get rid of
  infinite recursion at aliases in a subclass and a superclass.
  return actually defined class for other than singleton class.
  [ruby-core:60431] [Bug #9475]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-20 03:31:28 +00:00
normal e0a0edf548 time.c: freeze and preserve marshal-loaded time zone
We need to prevent vtm.zone from pointing to a GC-ed string buffer.
The rb_copy_generic_ivar call misses it because get_attr deleted it.
Thanks to nobu for the rb_str_new_frozen suggestion.

* time.c (time_mload): freeze and preserve marshal-loaded time zone
* test/ruby/test_time.rb: add test for GC on loaded object
  [Bug #9652]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-19 08:19:13 +00:00
sorah 55a9667de3 * vm_eval.c (eval_string_with_cref): Use file path even if scope is
given. Related to [ruby-core:56099] [Bug #8662] and r42103.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-18 14:06:34 +00:00
normal 3e6fe414d8 variable.c: avoid memory leak on const redefinition
* variable.c (rb_const_set): delete existing entry on redefinition
  [Bug #9645]
* test/ruby/test_const.rb (test_redefinition): test for leak

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45350 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-17 01:24:06 +00:00
nobu 163f9abe4f vm_insnhelper.c: relax arity check
* vm.c (invoke_block_from_c): add splattable argument.
* vm.c (vm_invoke_proc): disallow to splat when directly invoked.
* vm_insnhelper.c (vm_callee_setup_arg_complex, vm_callee_setup_arg):
  relax arity check of yielded lambda.  [ruby-core:61340] [Bug #9605]
* test/ruby/test_yield.rb (TestRubyYieldGen#emu_bind_params): no
  longer raise ArgumentError when splatting to lambda.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-13 16:18:45 +00:00
nobu 03787200af test/dl, test/fiddle: relax criteria
* test/dl/test_{cptr,handle}.rb, test/fiddle/test_{handle,pointer}.rb:
  relax memory leak criteria.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-13 16:18:30 +00:00
nobu 3be926db2a revert [Bug #9605]
* enum.c: revert r45284, r45286, r45292.  it conflicts with
  existing behaviors.  [Bug #9605]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-12 08:16:47 +00:00
nobu c28b5723f6 vm_insnhelper.c: disable fastpath if splat
* vm_insnhelper.c (vm_callee_setup_arg): disable fastpath if splat
  argument, since argc may differ for each calls.
  [ruby-core:61422] [Bug #9622]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-12 02:19:13 +00:00
normal 4101a5690e insns.def (opt_regexpmatch2): respect redefined match op
* insns.def (opt_regexpmatch2): respect redefined match op
  Thanks to Sam Rawlins for the fix.
* test/ruby/test_string.rb: test based on Tsuyoshi Sawada's report
  [Bug #9581]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-11 22:28:33 +00:00
ktsj b204fe182f * test/objspace/test_objspace.rb (TestObjSpace#test_dump_uninitialized_file):
remove dependency on json library.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-11 13:23:43 +00:00
nobu d4ab41e393 test_hash.rb: refine a test
* test/ruby/test_hash.rb (test_exception_in_rehash): do not run twice
  since this test does not use @cls.  making a hash may increase
  memory usage and should be in preparation.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-11 05:16:06 +00:00
nobu dc52725655 envutil.rb: do not check RSS by default
* test/ruby/envutil.rb (Test::Test#assert_no_memory_leak): do not
  check RSS by default, enabled by rss optional keyword argument.
  TestHash#test_exception_in_rehash sometimes fails otherwise.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-11 05:16:04 +00:00
usa 5543a55b52 * test: get rid of warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-11 04:22:34 +00:00
naruse 89dff2712d r45298 fix trivial bug
$initial_size must be a size, not a status

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-11 01:25:20 +00:00
charliesome c8c539a198 ext/objspace: Check fptr before trying to dump FILE object fd
Patch by Scott Francis. Closes GH-562.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45308 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-10 21:55:51 +00:00
nobu 21759a08b3 merge GH-558
* test/ruby/test_enumerator.rb (test_iterators): fix test for hash
  iterators.  [Fixes GH-558]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-10 01:51:45 +00:00
nobu dfdb8b7372 fiddle/function.c: fix memory leak on exception
* ext/fiddle/function.c (function_call): fix memory leak when an
  exception occurs at argument conversion or the function call.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-09 04:51:38 +00:00
nobu cb05f199ee tests for [Bug #9599]
* test/dl/test_{cptr,handle}.rb: tests for [Bug #9599].

* test/fiddle/test_{handle,pointer}.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-09 04:19:10 +00:00
nobu e20cd8ee49 test/ruby/envutil.rb: compare RSS to check memory leak
* test/ruby/envutil.rb (Test::Test#assert_no_memory_leak): compare
  also RSS if available.

* test/ruby/memory_status.rb (Memory::Status.parse): read string
  form of an instance.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-09 04:17:38 +00:00
nobu c052c80cda enum.c: yield multiple values
* enum.c (find_i): yield multiple values instead of a packed
  array, so that lambda block can work.  with tests by Alex
  Rothenberg.  [ruby-core:61340] [Bug #9605]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-07 22:36:32 +00:00
emboss 92a5ebb4b1 * test/openssl/test_ssl.rb: Reuse TLS default options from
OpenSSL::SSL::SSLContext::DEFAULT_PARAMS.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-07 03:15:39 +00:00
naruse 8d67a06b98 fix r45274; it change default but doesn't change tests [Bug #9424]
RUN TESTS BEFORE COMMIT!!!

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-06 16:42:27 +00:00
usa 9194b220a5 * test/ruby: get rid of warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-05 13:27:22 +00:00
nobu 01740f0c27 parse.y: optional arguments in rhs
* parse.y (f_arg_asgn): define optional arguments as argument
  variables in the rhs default expressions.
  [ruby-core:61299] [Bug #9593]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45272 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-05 06:56:49 +00:00
ktsj df0991f34b * ext/pathname/lib/pathname.rb (Pathname#find): add "ignore_error"
keyword argument defaulted to true as well as Find#find.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-04 15:44:53 +00:00
usa 77cf13a588 * test/ruby/test_eval.rb (TestEval#make_test_binding): renamed.
it's not test method.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-04 14:00:48 +00:00
usa 0562c4f76d * test/ruby: get rid of warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-04 13:55:24 +00:00
ktsj c754b22797 * lib/find.rb (Find#find): should pass ignore_error option to enumerators.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-03 15:28:58 +00:00
usa d0a9ee1e86 * test/test_find.rb (TestFind#test_unsearchable_dir): ruby cannot make
directory unreachable by owner on Windows.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-03 04:28:55 +00:00
usa 9e5f063138 * test/win32ole: get rid of warnings (unused variable).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-02 19:21:57 +00:00
usa 2c761d7264 * test/ruby/test_backtrace.rb: get rid of warnings. unused variable,
shadowing.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-02 15:18:36 +00:00
naruse 5bf9ac3e92 Use assert_separately to speed up
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-02 08:44:34 +00:00
naruse 5197ccc3ff fix the number of intro lines r44123
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-02 08:44:31 +00:00
nobu aad895181e find.rb: add ignore_error
* lib/find.rb (Find#find): add "ignore_error" keyword argument
  defaulted to true.  [ruby-core:51025] [Feature #7596]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-02 02:15:21 +00:00
akr 14ad015896 * lib/open3.rb (Open3.capture3): Ignore Errno::EPIPE for writing
stdin_data.
  (Open3.capture2): Ditto.
  (Open3.capture2e): Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-01 10:56:39 +00:00
nobu 2d89896461 * test/csv/test_data_converters.rb: use descriptive assertions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-01 07:08:19 +00:00