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

8083 Коммитов

Автор SHA1 Сообщение Дата
nobu 8d7f655261 test_tempfile.rb: assert_file
* test/test_tempfile.rb (test_default_basename): use assert_file
  for more descriptive message.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-04 01:58:49 +00:00
hsbt 05c108cdba * lib/tempfile.rb: provide default basename parameter.
[fix GH-523] Patch by @dissolved
* test/test_tempfile.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-04 00:18:38 +00:00
hsbt 1ba6e8868c * ext/fiddle/lib/fiddle/cparser.rb: r49110 brake Fiddle::Import with
type_alias
* test/fiddle/test_cparser.rb: added type_alias test for parse_ctype
  and parse_struct_signature.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-03 09:23:43 +00:00
akr ce80a49f38 Refine help message.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-03 02:52:01 +00:00
hsbt 574422733d * array.c: Improve performance of Array#shift. use shared instead of
MEMMOVE if with arguments. Patch by @ksss [fix GH-537]
* test/ruby/test_array.rb: ditto.
* benchmark/bm_array_shift.rb: Added benchmark of GH-537 issue.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-03 02:27:50 +00:00
hsbt a84bfcbf00 * lib/net/http.rb: More descriptive error message when net/http fails
to connect to a server. Patch by @xaviershay [fix GH-700]
* test/net/http/test_http.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-03 01:38:59 +00:00
hsbt 3afd0f9a91 * ext/fiddle/lib/fiddle/cparser.rb: Support for Fiddle::CParser
to handle rich signatures including parameter names and function
  pointer types. Patch by @theryan [fix GH-590]
* test/fiddle/test_cparser.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49110 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-03 00:54:37 +00:00
nobu 8d0d7da44e tracepointchecker.rb: for older TracePoint
* test/lib/tracepointchecker.rb (TracePointChecker): needs recent
  version of TracePoint, so that older versions can run to compare
  the resuls.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-02 19:03:23 +00:00
nobu 4ef6097f9a leakchecker.rb: for older IO.console
* test/lib/leakchecker.rb (check_fd_leak): do not call older
  version IO.console to get rid of ArgumentError, so that older
  versions can run to compare the resuls.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-02 19:03:17 +00:00
hsbt 57ee6eae5a * test/net/http/test_http.rb (_test_send_request__HEAD): Added
failing test for send_request with HEAD method.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-02 12:04:53 +00:00
hsbt c7d6c0d084 * test/ruby/test_module.rb: Refactor invalid testcase.
[fix GH-472][ruby-core:59035][Bug #9240]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-02 07:21:36 +00:00
hsbt 73fc0cc572 * lib/webrick/utils.rb: removed unused argument variable.
[fix GH-356] Patch by @vipulnsward
* lib/webrick/server.rb: ditto.
* lib/webrick/ssl.rb: ditto.
* test/webrick/test_utils.rb: added test for WEBrick::Utils#create_listeners.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-02 06:53:12 +00:00
hsbt dc599c2cb8 * test/openssl/test_ssl_session.rb (OpenSSL#test_ctx_client_session_cb):
fix test failure with OpenSSL disabled SSLv3 protocol.
  [ruby-core:63772] [Bug #10046]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-02 06:10:07 +00:00
nobu f5da412c9e test_yield.rb: assert_all_sentences
* test/ruby/test_yield.rb (assert_all_sentences): test all
  sentences and report all results at the end.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-02 03:40:10 +00:00
nobu 6d65806f8b tracepointchecker.rb: needs TracePoint
* test/lib/tracepointchecker.rb: available only if TracePoint is
  available.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-02 02:37:47 +00:00
nobu 163ecb32e9 test_m17n.rb: split test_scrub
* test/ruby/test_m17n.rb (TestM17N#test_scrub): split into some
  tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-02 00:41:54 +00:00
akr ec7f1f5dc2 * lib/resolv.rb (Resolv::DNS::Label::Str#==): Check class equality.
(Resolv::DNS::Name#initialize): Normalize labels as
  Resolv::DNS::Label::Str objects.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-02 00:10:04 +00:00
nobu 418c1375fb test_rubyoptions.rb: locale name
* test/ruby/test_rubyoptions.rb: try locale encoding name.
  [ruby-core:67109] [Bug #10643]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-01 08:50:55 +00:00
normal 8717a9ec86 symbol.c: fix memory leak from global fstr hash
* symbol.c (rb_gc_free_dsymbol): delete from global fstr hash
* test/ruby/test_symbol.rb (test_symbol_fstr_leak): test for bug
  [ruby-core:67268] [Bug #10686]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-01 02:18:40 +00:00
nobu 6a37b8cde3 vm_args.c: fix non-symbol keys hash
* vm_args.c (keyword_hash_p): fix non-symbol keys hash.
  rb_extract_keywords() returns 0 not Qnil when no symbol keys is
  included.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-01 00:14:23 +00:00
nobu ac47d6a8cf parse.y: disable past scope warnings
* parse.y (gettable_gen): disable warnings of possible reference
  to a local variable defined in a past scope.
  [ruby-core:67162] [Bug #10661]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-31 07:48:47 +00:00
nobu 69a7bb31f9 resolv.rb: case-insensitive comparison
* lib/resolv.rb (Resolv::DNS::Name#==): DNS is case-insensitive, so the
  comparison should be case-insensitive as well.
  [ruby-core:66498] [Bug #10550]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-30 07:16:14 +00:00
nobu 1441d9da99 test_dns.rb: test name
* test/resolv/test_dns.rb (TestResolvDNS#test_dots_diffences): fix
  test name.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-30 07:05:32 +00:00
nobu a0325ea704 resolv.rb: dots differences
* lib/resolv.rb (Resolv::DNS::Name): names with different dots
  should be different.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-30 07:03:47 +00:00
nobu 205cf0140d test_time.rb: fix method to test
* test/test_time.rb (subtest_xmlschema_alias): test the specified
  method, not fixed name iso8601.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-30 01:38:41 +00:00
nobu 316210b80b re.c: append excape sequence as-is
* re.c (unescape_nonascii): append excape sequence as-is not
  unescaped character, to get rid of unexpected meta-character.
  [ruby-core:67193] [Bug #10670]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-29 09:58:48 +00:00
nobu 401c8bb00b thread.c: fix dynamic symbol keys
* thread.c (rb_thread_variable_get): fix dynamic symbol keys.
  rb_check_id() returns non-zero only for static symbols, whereas
  thread local variable keys can be dynamic symbols.
  [ruby-core:67185] [Bug #10667]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-29 02:18:20 +00:00
hsbt 4a481ad400 * ext/json, test/json: merge JSON HEAD(17fe8e7)
https://github.com/flori/json/compare/v1.8.1...17fe8e7

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-28 22:29:11 +00:00
nobu 8b5c69fa97 test_extlibs.rb: show mkmf.log
* test/ruby/test_extlibs.rb (check_existence): show mkmf.log of
  failed extension libraries.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-28 14:04:26 +00:00
normal 64241b0921 test_iseq_load: expand tests with stack mismatches
We can ensure the loader works for these cases even if the
reoptimized bytecode is not a match for the original.

* test/-ext-/iseq_load/test_iseq_load.rb
  (test_next_in_block_in_block): test using ISeq#eval
  (test_break_ensure): ditto
  [ruby-core:66988]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-28 09:20:21 +00:00
nobu 952ed33b13 parse.y: fix internal IDs conflict
* parse.y (f_kwrest, new_args_tail_gen): unnamed rest keyword and
  keywords bits arguments should be unique.  since internal IDs
  depend on the local variable index in the current scope, new ID
  should be made before popping those vtables.
  [ruby-core:67157] [Bug #10659]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-28 04:54:28 +00:00
nobu 903046aa48 test_io_console.rb: different names
* test/io/console/test_io_console.rb (test_noctty): use different
  names for each tempfiles.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-28 00:24:47 +00:00
usa 3d2b7c0797 * test/ruby/test_extlibs.rb: test in separated process for mathn/*.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-26 01:57:32 +00:00
zzak 7fa0c70ef7 s/existance/existence
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49019 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-25 23:20:52 +00:00
naruse 9099a55ad6 don't require mathn, it breaks the world
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-25 21:36:18 +00:00
usa f0f4d12faf remove old empty directories.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-25 15:37:03 +00:00
usa 6535bd5d31 * test/ruby/test_extlibs.rb: check existance of extension libraries
which not depend on outer libraries. (experimental)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-25 15:15:18 +00:00
nobu 945e4692ca console.c: IO.console arguments passing
* ext/io/console/console.c (console_dev): send the given arguments
  to the opened console.  as a special case, do nothing if :close
  is given.
* test/lib/leakchecker.rb (LeakChecker#check_fd_leak): close if
  console.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-25 07:14:12 +00:00
nobu f0806c4863 file.c: drop ignored chars
* file.c (rb_file_expand_path_internal): drop characters ignored
  by filesystem on Mac OS X.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-25 07:01:22 +00:00
nobu 0ebfc6f216 dir.c: replace_real_basename
* dir.c (replace_real_basename): get the real name and replace the
  base name with it by getattrlist(2) if available.
  suggested by Matthew Draper at [ruby-core:67116].  [Bug #10015]
* dir.c (glob_helper): get the real name of the whole path, not
  only the last name.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-25 06:36:18 +00:00
nobu 913943270d test_io_console.rb: use gets
* test/io/console/test_io_console.rb (run_pty): pty cannot read
  all, should use gets only.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-25 06:17:49 +00:00
nobu d33a3837cb test_io_console.rb: chomp results
* test/io/console/test_io_console.rb (run_pty): IO#readlines
  ignores the given block.  need map to chomp the results.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-25 03:51:27 +00:00
nobu f5f6218a23 parse.y: warn past scope variable
* parse.y (gettable_gen): warn possible reference to a local
  variable defined in a past scope.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-25 03:47:46 +00:00
usa c10d7640b2 * test/io/console/test_io_console.rb (TestIO_Console#run_pty): no block given.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-25 02:37:17 +00:00
nobu fb933bf70b test_dns.rb: fix scope
* test/resolv/test_dns.rb (test_query_ipv4_address): fix local
  variables scope.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-25 01:23:57 +00:00
nobu d8d326c97a console.c: get rid of NameError
* ext/io/console/console.c (console_dev): id_console is not a
  constant name, use rb_const_remove() to get rid of NameError.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-25 01:09:17 +00:00
usa 86693b30c5 * test/resolv/test_dns.rb (TestResolvDNS#test_query_ipv4_address):
set timeout for recvfrom because if client thread is crashed, it
  waits infinity.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-25 00:21:00 +00:00
nobu 007c4dbe84 test_rdoc_generator_json_index.rb: leaked fd
* test/rdoc/test_rdoc_generator_json_index.rb (test_generate_gzipped):
  fix leaked file descriptor.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-24 23:11:44 +00:00
naruse 32f124e68a use timeout lib
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-24 18:59:45 +00:00
nobu e000d687b3 test_gc.rb: termsig
* test/ruby/test_gc.rb (test_interrupt_in_finalizer): also check
  termsig to ensure killed by SIGINT.  and try SIGSEGV to dump
  something.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-24 13:25:28 +00:00
naruse 5328fa259b add timeout to avoid global timeout
http://ruby-mswin.cloudapp.net/vc10-x64/ruby-trunk/log/20141224T065940Z.log.html.gz

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-24 08:32:55 +00:00
naruse 0f7e301fe1 * lib/net/http/response.rb (Net::HTTPResponse): require one or more
spaces [Bug #10591].
  by leriksen <leif.eriksen.au@gmail.com>
  https://github.com/ruby/ruby/pull/782 fix GH-782
  NOTE: graph.facebook.com returns without SP Reason-Phrase.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-23 18:10:19 +00:00
naruse 30fef86b38 * lib/uri/generic.rb (URI::Generic#query=): don't escape [\]^
on both rfc2396 and rfc3986. [Bug #10619]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-23 13:11:43 +00:00
svn 2f4570e742 * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-22 12:31:59 +00:00
suke 14c5bd12ad * test/win32ole/test_win32ole_event.rb: some tests are
executed on standard Windows OS without ADO.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-22 12:31:45 +00:00
suke 03a6d033af * test/win32ole/test_win32ole_event.rb: test_s_new_exception is
executed on standard Windows OS without ADO.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-21 01:56:04 +00:00
akr fa9f7c2557 Add a test for Dir.mktmpdir(nil) [ruby-core:66943] [Bug #10616].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-20 08:58:30 +00:00
normal 927bd684c1 test/test_weakref.rb: increase timeout [Bug #10618]
* test/test_weakref.rb (test_repeated_object_leak): increase timeout
  [Bug #10618]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-19 20:20:33 +00:00
usa b56666a4b4 * test/ruby/test_rubyoptions.rb: (TestRubyOptions#test_verbose): support RC.
see also r48888.  reported by Vit Ondruch.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-19 13:03:36 +00:00
usa a7fe780482 * test/ruby/test_rubyoptions.rb (TestRubyOptions#test_version): should support
rc :-P



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-19 02:52:17 +00:00
normal 4dbb25e8b9 test/ruby/test_iseq.rb: spelling fix: s/diable/disable/
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-18 00:03:30 +00:00
hsbt bf29986371 * test/gdbm/test_gdbm.rb: Added test for each_key called without a block.
Patch by @joeyates [fix GH-783]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-17 01:50:14 +00:00
ko1 6eac885ebe * compile.c (iseq_compile_each): check
iseq->compile_data->option->specialized_instruction for opt_* insn.
* test/ruby/test_iseq.rb: check no specialized_instructions option.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-17 01:20:22 +00:00
normal fcf6fa8781 compile.c: skip opt_* insns for fstr args with block given
* compile.c (iseq_compile_each): only emit opt_str_freeze,
  opt_aref_with, and opt_aset_with insn when no block is given
  [Bug #10557] [ruby-core:66595]
* test/ruby/test_optimization.rb (test_block_given_aset_aref):
  new test for bug thanks to Bartosz Kopinski.
  (test_string_freeze): additional assertion for object_id

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-17 00:54:13 +00:00
nobu e4717eaa4c iseq.c: struct accessors
* iseq.c (rb_method_for_self_aref, rb_method_for_self_aset): call
  accessor functions directly, not to be affected by [] and []=
  methods.  [ruby-core:66846] [Bug #10601]
* struct.c (define_aref_method, define_aset_method): ditto.
* vm_insnhelper.c (rb_vm_opt_struct_aref, rb_vm_opt_struct_aset):
  direct accessors of Struct.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-16 06:18:25 +00:00
nobu 5020101829 test_rubyoptions.rb: clean crash log
* test/ruby/test_rubyoptions.rb (test_segv_loaded_features): clean
  crash log on OS X after intentional segv.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-16 04:39:17 +00:00
ko1 9787723785 * test/ruby/test_process.rb (test_deadlock_by_signal_at_forking):
extend timeout seconds to 60 for RGENGC_CHECK_MODE > 0 environment.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-16 03:03:24 +00:00
headius 0a52821396 * test/lib/test/unit.rb: Also rescue EINVAL for older Linux that
raises it in popen. [Bug #10494]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-15 22:33:44 +00:00
headius 0e590199f9 * test/ruby/test_time.rb: Add test for getlocal(nil). See
jruby/jruby#2310.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-15 19:59:12 +00:00
headius 0f99627a79 * test/ruby/test_io_m17n.rb: Add test for coderange clearing in
IO#read with buffer. See jruby/jruby#2316.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-15 18:56:30 +00:00
ko1 85b42fe17b * ext/objspace/objspace.c: ObjectSpace.memsize_of(obj) returns
with sizeof(RVALUE). [Bug #8984]
* gc.c (obj_memsize_of): ditto.
* NEWS: add a NEWS entry.
* test/objspace/test_objspace.rb: catch up this fix.
* test/ruby/test_file_exhaustive.rb: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-15 08:54:07 +00:00
nobu 020fcc95fe string.c: fix coderange for non-endianness string
* string.c (rb_enc_str_coderange): dummy wchar, non-endianness
  encoding string cannot be ascii only.
  [ruby-core:66835] [Bug #10598]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-15 07:19:25 +00:00
naruse b2a128fa7c comment out for x86 extended precision
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-15 06:17:58 +00:00
nobu 2de3281af4 parse.y: warn reference after method definition
* parse.y (primary): restore current_arg so that circular
  reference after a method definition is also warned.
  [ruby-core:61299] [Bug #9593]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-14 11:11:45 +00:00
nobu 7c81643953 test_gc.rb: workaround for Windows
* test/ruby/test_gc.rb (test_interrupt_in_finalizer): use inner
  process signal for Windows.  [ruby-core:66825] [Bug #10595]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-13 23:46:54 +00:00
nobu e50746da00 test_gc.rb: wait
* test/ruby/test_gc.rb (test_interrupt_in_finalizer): wait longer
  and send more interrupts for slower cases.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-13 21:55:17 +00:00
nobu 05459d1a33 vm_trace.c: defer interrupts while postponed jobs
* vm_trace.c (rb_postponed_job_flush): mask signal trap interrupt
  too to defer handling after finalizers finished.
  [ruby-core:66825] [Bug #10595]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-13 11:41:57 +00:00
hsbt 6447d061f5 * test/openssl/test_pkey_ec.rb: ignored tests with old OpenSSL.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-13 09:33:33 +00:00
nobu 21a40e94ac skip old OpenSSL
* test/open-uri/test_ssl.rb, test/webrick/test_httpproxy.rb: also
  depends on test/openssl/utils.rb.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-13 07:12:56 +00:00
nobu b392fd5c55 test_https.rb: skip old OpenSSL
* test/net/http/test_https.rb (TestNetHTTPS): also depends on
  test/openssl/utils.rb

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-13 07:08:18 +00:00
nobu af06381332 test/openssl: skip old OpenSSL
* test/openssl/utils.rb (OpenSSL::TestUtils): ignore out-of-date
  OpenSSL before 1.0.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-13 03:05:43 +00:00
nobu 88cea9f7e2 revert r48819
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-13 03:05:31 +00:00
nobu 76b9d37b56 test_object.rb: no RSS check
* test/ruby/test_object.rb (test_copied_ivar_memory_leak): ignore
  RSS to disable false failure.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-13 02:11:10 +00:00
normal 856903850b gc.c (define_final0): avoid duplicate blocks
This prevents excessive memory growth when a WeakRef
is repeatedly created

* gc.c (define_final0): avoid duplicate blocks
  [Bug #10537]
* test/test_weakref.rb (test_repeated_object_leak): new test

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-13 01:28:18 +00:00
nobu 58d992ec44 test_ocsp.rb: run separately
* test/openssl/test_ocsp.rb (test_new_ocsp_request): run in a
  separated process to continue on CentOS 5.6 i386.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-13 00:20:00 +00:00
nobu 8326a747f9 erb: suppress warnings
* bin/erb (ERB::Main#run): get rid of shadowing outer local
  variables.  [ruby-core:65772] [Feature #10395]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48788 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-12 19:59:22 +00:00
nobu 9e52416cd3 erb: set variables from the command line
* bin/erb (ARGV.switch, ERB::Main#run): allow variables to be set
  from the command line.  [ruby-core:65772] [Feature #10395]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-12 10:48:57 +00:00
nobu e82f4195d4 erb: lineno and location setters
* lib/erb.rb (ERB#lineno): accessor for line number to eval.
* lib/erb.rb (ERB#location=): setter of file name and line number.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-12 10:31:47 +00:00
nobu 01e621579a string.c: check arguments for crypt
* string.c (rb_str_crypt): check arguments more strictly.
  * crypt() is not for wide char strings
  * salt bytes should not be NUL

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-12 01:49:20 +00:00
nobu 88ae402cbf string.c: term fill
* string.c (tr_trans): fill wchar terminator.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-12 01:20:41 +00:00
nobu a88e787277 envutil.rb: kill pgroup
* test/lib/envutil.rb (invoke_ruby): kill whole group when :pgroup
  option is set.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-11 13:54:02 +00:00
nobu 3977132bbb test_process.rb: split
* test/ruby/test_process.rb (test_execopts_redirect): split large
  test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-11 04:26:30 +00:00
nobu 5c100b57f8 string.c: term fill
* string.c (rb_str_squeeze_bang): fill wchar terminator.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-11 00:37:58 +00:00
nobu 7a77cf7133 string.c: term fill
* string.c (rb_str_delete_bang): fill wchar terminator.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-10 12:26:11 +00:00
nobu 117438ee7b string.c: term fill
* string.c (rb_str_sub_bang): fill wchar terminator.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-10 12:09:49 +00:00
nobu 9d17096309 string.c: term fill
* string.c (rb_str_splice_0): fill wchar terminator.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-10 07:49:10 +00:00
nobu ed94c24944 string.c: term fill
* string.c (rb_str_chop_bang): fill wchar terminator.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-10 07:48:56 +00:00
nobu c77efe1144 string.c: term fill
* string.c (rb_str_chomp_bang): fill wchar terminator.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-10 07:48:48 +00:00
nobu d5b5338421 test_cstr.rb: all wchar encodings
* test/-ext-/string/test_cstr.rb (assert_wchars_term_char): test
  for all wide char encodings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-10 04:39:45 +00:00
nobu bf74f633c5 test_cstr.rb: failed encoding name
* test/-ext-/string/test_cstr.rb (test_wchar_long): show the
  failed encoding name in error messages.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-10 00:40:17 +00:00
usa bf4b7f3b8c * test/net/http/test_https.rb
(TestNetHTTPS#test_certificate_verify_failure): on Windows,
  Errno::ECONNRESET will be raised when the verify is failure at the
  client side, and it'll be eaten by WEBrick.

* test/open-uri/test_ssl.rb (TestOpenURISSL#test_validation_failure):
  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-09 17:51:43 +00:00
normal 65651b34b1 struct: avoid all O(n) behavior on access
This avoids O(n) on lookups with structs over 10 members.
This also avoids O(n) behavior on all assignments on Struct members.
Members 0..9 still use existing C methods to read in O(1) time

Benchmark results:

vm2_struct_big_aref_hi*	1.305
vm2_struct_big_aref_lo*	1.157
vm2_struct_big_aset*	3.306
vm2_struct_small_aref*	1.015
vm2_struct_small_aset*	3.273

Note: I chose use loading instructions from an array instead of writing
directly to linked-lists in compile.c for ease-of-maintainability.  We
may move the method definitions to prelude.rb-like files in the future.

I have also tested this patch with the following patch to disable
the C ref_func methods and ensured the test suite and rubyspec works

	--- a/struct.c
	+++ b/struct.c
	@@ -209,7 +209,7 @@ setup_struct(VALUE nstr, VALUE members)
		ID id = SYM2ID(ptr_members[i]);
		VALUE off = LONG2NUM(i);

	-	if (i < N_REF_FUNC) {
	+	if (0 && i < N_REF_FUNC) {
		    rb_define_method_id(nstr, id, ref_func[i], 0);
		}
		else {

* iseq.c (rb_method_for_self_aref, rb_method_for_self_aset):
  new methods to generate bytecode for struct.c
  [Feature #10575]
* struct.c (rb_struct_ref, rb_struct_set): remove
  (define_aref_method, define_aset_method): new functions
  (setup_struct): use new functions
* test/ruby/test_struct.rb: add test for struct >10 members
* benchmark/bm_vm2_struct_big_aref_hi.rb: new benchmark
* benchmark/bm_vm2_struct_big_aref_lo.rb: ditto
* benchmark/bm_vm2_struct_big_aset.rb: ditto
* benchmark/bm_vm2_struct_small_aref.rb: ditto
* benchmark/bm_vm2_struct_small_aset.rb: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-09 15:43:49 +00:00
nobu 428791543b thread.c: get rid of invalid ID symbol
* eval.c (rb_frame_last_func): return the most recent frame method
  name.
* thread.c (recursive_list_access): use the last method name,
  instead of the current method name which can be unset in some
  cases, not to use a symbol by the invalid ID.
  [ruby-core:66742] [Bug #10579]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-09 01:16:27 +00:00
usa f53a1931a7 * test/net/imap/test_imap.rb (ImapTest#imaps_test): forced error on SSL sockets
causes Errno::ECONNRESET or Errno::ECONNABORTED instead of Errno::EPIPE on
  Windows.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-07 13:59:17 +00:00
drbrain 4260aa1dc3 * lib/rdoc: Update to RDoc 4.2.0.
* test/rdoc:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-07 01:22:37 +00:00
drbrain 97f80207d0 * lib/rubygems: Update to RubyGems 2.4.5.
* test/rubygems:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-07 00:53:01 +00:00
shugo a0b80a4410 * lib/net/imap.rb: Fix undefined variable usage & refactor/DRY
code.  Patch by @aledovsky. [Fixes GH-770]

* test/net/test_imap.rb: related test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-06 01:13:45 +00:00
hsbt e2bbfaa67c * lib/rake: Update to rake 10.4.2
* test/rake: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-06 00:22:51 +00:00
usa d03528608d * test/test_pp.rb (PPTestModule::PPFileStatTest): test for r48719.
is this the right place here?



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-05 19:48:15 +00:00
nobu 8a7690a5ed test_rubyoptions.rb: non-codepage names glob
* test/ruby/test_rubyoptions.rb (test_command_line_glob_noncodepage):
  more assertion for fallback replacement on non-codepage names.
  [ruby-dev:48752] [Bug #10555]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-05 11:37:10 +00:00
nobu bbd0c7a339 test_rubyoptions.rb: non-codepage names glob
* test/ruby/test_rubyoptions.rb (test_command_line_glob_noncodepage):
  test for command line globbing on non-codepage names.
  [ruby-dev:48752] [Bug #10555]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-05 10:35:43 +00:00
nobu cbdac1eaf6 parse.y: fix lex_state after tLABEL_END
* parse.y (parser_yylex): fix lex_state after tLABEL_END, should
  be EXPR_LABELARG to be followed by "paren with arg".
  [ruby-core:66705] [Feature #4935]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-05 00:46:08 +00:00
normal 9581954a96 mostly fix rb_iseq_load
This allows reporters commenters of [Feature #8543] to load
instruction sequences directly.  Some test cases are still failing
but documented in test/-ext-/iseq_load/test_iseq_load.rb.

* compile.c (rb_iseq_build_from_exception): entry->sp is unsigned
  (iseq_build_callinfo_from_hash): account for kw_arg
  (iseq_build_from_ary_body): update for r35459
  (CHECK_STRING, CHECK_INTEGER): remove unused checks
  (int_param): new function for checking new `params' hash
  (iseq_build_kw): new function for loading rb_iseq_param_keyword
  (rb_iseq_build_from_ary): account for `misc' entry and general
   structure changes
  [Feature #8543]
* iseq.c (CHECK_HASH): new macro (for `misc' and `param' entries)
  (iseq_load): account for `misc' and `params' hashes
  (iseq_data_to_ary): add final opt to arg_opt_labels,
   fix kw support, account for unsigned entry->sp
* ext/-test-/iseq_load/iseq_load.c: new ext for test
* ext/-test-/iseq_load/extconf.rb: ditto
* test/-ext-/iseq_load/test_iseq_load.rb: new test

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-03 22:16:58 +00:00
normal 0c662b3431 iseq.c: avoid segfault on incomplete iseq
Compile failures will trigger iseq_free before
iseq->callinfo_entries are allocated at all.

* iseq.c (iseq_free): avoid segfault on incomplete iseq
* test/ruby/test_syntax.rb (test_invalid_next): new test
  for syntax error, not segfault

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-03 22:03:59 +00:00
headius e0c3f58102 * test/test_open3.rb: Add a simple test for env hash on popen3.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-02 22:08:05 +00:00
headius 0b31b7cd14 * test/ruby/test_eval.rb: add case to test "sticky" instance_eval
self when passed a reified block (proc/lambda).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-02 18:22:15 +00:00
tenderlove 12396fda40 * ext/psych/lib/psych/visitors/to_ruby.rb: support objects that are
marshalable, but inherit from basic object.
  Thanks Sean Griffin <sean@thoughtbot.com>

* ext/psych/lib/psych/visitors/yaml_tree.rb: ditto

* test/psych/test_marshalable.rb: test for fix

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-01 21:35:11 +00:00
nobu 0a190272cd parse.y: preserve tSTRING_CONTENT results
* parse.y (ripper_flush_string_content): preserve the dispatched
  results at tSTRING_CONTENT.  [ruby-dev:48714] [Bug #10437]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-01 21:32:04 +00:00
nobu 11dc42c20c parse.y: enable encoding pragma in ripper
* parse.y (magic_comment_encoding): enable in ripper, since the
  encoding is necessary to parse non-default encoding scripts.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-01 17:53:02 +00:00
naruse e1606f920b * lib/uri/generic.rb (URI::Generic.build):
use hostname= to detect and wrap IPv6 hosts.
  Build is accepting URI components and users may not expect
  that a host component needs to be wrapped with square brackets
  since it's not providing a URI.
  Note: initialize with arg_check => true does not wrap IPv6 hosts.
  by Joe Rafaniello <jrafanie@redhat.com>
  https://github.com/ruby/ruby/pull/765 fix GH-765

* test/uri/test_generic.rb: Add more tests

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-01 17:36:54 +00:00
nobu d40aad1c09 parse.y: fix a typo
* parse.y (regexp_contents): fix a typo.  pointed out by wanabe.
  [ruby-dev:48741] [Bug #10543]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-30 11:05:58 +00:00
akr 1918ea16c7 * test/ruby/test_process.rb (test_deadlock_by_signal_at_forking):
Don't raise Interrupt.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-30 09:57:04 +00:00
akr ea44d4d9d5 * test/ruby/test_process.rb (test_deadlock_by_signal_at_forking): Use
assert_separately.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-30 08:11:36 +00:00
nobu 1ce81d6f8b ruby.c: transcode program names
* ruby.c (process_options, ruby_script): transcode script name and
  program name to locale encoding as well as argv.
  [ruby-dev:48752] [Bug #10555]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-29 15:02:58 +00:00
nobu 18c8bfafa0 test_rubyoptions.rb: workaround
* test/ruby/test_rubyoptions.rb (test_command_line_glob_nonascii):
  workaround for other than cp932.  [ruby-dev:48752] [Bug #10555]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-29 15:02:02 +00:00
nobu 33ea2646b9 win32.c: use UTF-8 for argv
* ruby.c (ruby_set_argv): convert argv from UTF-8.
* win32/win32.c (rb_w32_sysinit, cmdglob, w32_cmdvector): convert
  wide char command line to UTF-8 argv, and glob in UTF-8 so that
  metacharacters would match multibyte characters.
  [ruby-dev:48752] [Bug #10555]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-29 07:53:17 +00:00
usa c8da47e859 * test/ruby/test_const.rb (TestConst#test_redefinition_memory_leak): extend the
timeout because mswin CI reports timeout.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-29 06:01:49 +00:00
usa 75ec406b43 * test_exception.rb: indent.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-29 06:00:19 +00:00
nobu 6bb52d8026 test/ruby: suppress warnings
* test/ruby/test_array.rb: (need_continuation): suppress warnings
  to require continuation.

* test/ruby/test_continuation.rb: ditto.

* test/ruby/test_enum.rb: ditto.

* test/ruby/test_fiber.rb: ditto.

* test/ruby/test_hash.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-29 00:36:33 +00:00
usa 84e90deb0e * test/ruby/test_exception.rb (TestException#test_output_string_encoding): need
to specify the encoding of script.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-28 23:52:34 +00:00
usa 3987392187 * test/ruby/test_exception.rb (TestException#test_output_string_encoding): test
for r48637.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-28 22:32:36 +00:00
ko1 ea29080489 * compile.c (iseq_compile_each): remove duplicated line event.
[Bug #10449]
* test/ruby/test_settracefunc.rb: add and fix tests.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-27 11:06:51 +00:00
ko1 6115f65d7d * vm_args.c: fix backtrace location for keyword related exceptions.
For example, the following program
    def foo(k1: 1); end # line 1
            foo(k2: 2)          # line 2
  causes "unknown keyword: k2 (ArgumentError)".
  Before this patch, the backtrace location is only line 2.
  However, error should be located at line 1 (over line 2 in
  stack trace). This patch fix this problem.
* class.c (rb_keyword_error_new): separate exception creation logic
  from rb_keyword_error(), to use in vm_args.c.
* vm_insnhelper.c (rb_arg_error_new): rename to rb_arity_error_new().
* vm_args.c (argument_arity_error): rename to argument_arity_error().
* vm_args.c (arugment_kw_error): added to fix backtrace.
* test/ruby/test_keyword.rb: add tests.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-27 10:15:47 +00:00
nobu c158fccd2b test_const.rb: use assert_warning
* test/ruby/test_const.rb (test_redefinition): should use
  assert_warning for warning message test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-27 03:42:45 +00:00
nobu 97cfffcdc6 envutil.rb: skip if load failed
* test/lib/envutil.rb (assert_no_memory_leak): skip when failed to
  load fiddle.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-27 03:42:32 +00:00
tarui 18a7dade10 * test/ruby/test_autoload.rb (class TestAutoload): change load target
from Continuation to Date. Becouse Continuation is no longer quiet.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-26 13:31:23 +00:00
hsbt 3f37ba11a1 * test/inlinetest.rb: removed unused test helper.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-26 12:18:49 +00:00
ko1 42a15516c0 * test/ruby/test_gc.rb (test_latest_gc_info): do test separately
to avoid mysterious behavior.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-26 11:00:19 +00:00
akr 0eadc632c1 * lib/tsort.rb: Returns an enumerator if no block is given.
[ruby-core:66270] [Feature #10508] Proposed by Andrey Savchenko.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-26 10:46:50 +00:00
nobu eab191040e parse.y: fix invalid keyword argument
* parse.y (f_label, f_kw, formal_argument_gen): ignore invalid
  formal argument in keyword argument definition.
  [ruby-dev:48742] [Bug #10545]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-26 08:25:48 +00:00
naruse d3236ba3b4 add test for r48563
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-26 08:22:27 +00:00
nobu 91e2cd34d4 vm_method.c: preserve encodings
* vm_method.c (rb_mod_remove_method): preserve encodings of method
  name and class name in error messages.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-25 18:58:05 +00:00
nobu d0ac6d5879 object.c: preserve encodings
* object.c (inspect_i): preserve encodings in inspected result
  string.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-25 18:44:16 +00:00
nobu f2fc80cebe vm_method.c: preserve encodings
* vm_method.c (rb_method_entry_make): preserve encodings of
  constant names in warning messages.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-25 18:44:12 +00:00
nobu 5d4aad2b1b vm_eval.c: preserve encoding
* vm_eval.c (rb_method_call_status): preserve encoding of called method
  name in error messages.

* vm_insnhelper.c (vm_call_method): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-25 18:44:07 +00:00
nobu ddfcb96930 safe.c: preserve encoding
* safe.c (rb_secure): preserve encoding of the called method name
  in error messages.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-25 18:43:58 +00:00
nobu f77d402352 safe.c: preserve encoding
* safe.c (rb_insecure_operation): preserve encoding of the called
  method name in error messages.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-25 18:43:47 +00:00
drbrain 3908d5d330 * lib/rake: Update to rake 10.4.0
* test/rake:  ditto.
* NEWS:  ditto.

* test/lib/minitest/unit.rb:  Add compatibility shim for minitest 5.
  This only provides minitest 5 unit test naming compatibility.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-25 07:03:36 +00:00
nobu 09fbd56e6f process.c: get rid of inadvertent ID pindown
* process.c (check_exec_redirect_fd, check_exec_redirect),
  (rb_execarg_addopt): get rid of inadvertent ID pindown.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-24 03:44:45 +00:00
nobu 25bab786cb string.c: preserve encoding of global variable
* string.c (rb_str_setter): preserve encoding of global variable
  name in error message.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-23 17:03:48 +00:00
nobu b58802a3c1 iseq.c: preserve encoding at disassembling
* iseq.c (rb_insn_operand_intern): preserve encoding of method
  name in CALL_INFO at disassembling.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-23 17:03:32 +00:00
nobu 9519f6193a io.c: preserve encodings
* io.c (must_respond_to): preserve encodings of variable name and
  class name in warning message.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-23 17:03:08 +00:00
nobu 237162a3b1 test_variable.rb: suppress warnings
* test/ruby/test_variable.rb (ruler4): suppress warning.
  (test_global_variable_poped, test_constant_poped): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-22 23:47:22 +00:00
nobu f5063b7ea7 dummyparser.rb: on_rescue
* test/ripper/dummyparser.rb (on_rescue): add to turn exception
  class list into NodeList, to test exception class list.

* test/ripper/test_parser_events.rb (test_rescue_class): add
  missing test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-22 07:10:31 +00:00
tenderlove 570c028c7e * lib/resolv.rb: fall back if canonicalization fails.
Thanks Vit Ondruch for the patch!  [ruby-core:65836]

* test/resolv/test_dns.rb: test for patch

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-21 20:04:27 +00:00
nobu 8eb0c810b2 get rid of inadvertent ID creation
* object.c (rb_mod_const_get, rb_mod_const_defined): ditto.
* variable.c (rb_const_missing, rb_mod_const_missing): call
  const_missing without new ID to get rid of inadvertent ID
  creation.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-21 16:11:55 +00:00
usa 37d0c509b7 * test/psych/json/test_stream.rb (Psych::JSON::TestStream::test_list_to_json):
escape `]`.

* test/psych/test_json_tree.rb (Psych::JSON::TestJSONTree#test_list_to_json):
  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-20 08:04:29 +00:00
usa 9d38d655e6 * test/ripper/test_files.rb: set filename.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-20 07:56:08 +00:00
nobu 1bfee27795 test_vector.rb: fix exception class
* test/matrix/test_vector.rb (test_independent): fix exception
  class path, Vector does not have its own TypeError.  [#10451]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-19 23:57:56 +00:00
marcandre 387e0dbe3f * lib/matrix.rb: Vector#independent? and associated class method
patch by gogo tanaka [#10451]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-19 17:44:46 +00:00
marcandre 4da89e192a * lib/matrix.rb: Add Vector#angle_with
Patch by Egunov Dmitriy [#10442]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-19 17:32:58 +00:00
nobu 098127dc2b parse.y: regexp error in ripper
* parse.y (ripper_flush_string_content, parser_parse_string):
  preserve parsed string content.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-19 17:10:35 +00:00
nobu 5023492957 parse.y: fix literal symbol list node type
* parse.y (symbol_list): fix the node type of literal symbol list
  with no interpolation.  [ruby-core:66343]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-18 19:16:27 +00:00
nobu 5cf688a588 test_exception.rb: missing test
* test/ruby/test_exception.rb (test_name_error_info): add missing
  test of NoMethodError and NameError.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-18 15:11:03 +00:00
nobu b3eaacdefc test_module.rb: fix encoding
* test/ruby/test_module.rb (test_const_set_invalid_name): warning
  message encoding depends on Encoding.default_internal.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-18 01:38:50 +00:00
nobu 88212206f6 test_inadvertent_creation.rb: split test
* test/-ext-/symbol/test_inadvertent_creation.rb: split
  test_module_const_defined? from test_module_const_get, and
  assertion for the latter.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-17 18:40:50 +00:00
nobu 358840fa7d object.c: fix error message
* object.c (check_setter_id): show the original argument instead
  of nil on TypeError.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-17 18:23:09 +00:00
hsbt d35a2bd4df * lib/rubygems/*, test/rubygems/*: Update to RubyGems 2.4.4
master (2f6e42e).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-17 03:55:02 +00:00
nobu 0884d0b944 proc.c: fix method proc binding location
* proc.c (proc_binding): use the original iseq on a binding from
  proc from method object to get the location.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-16 21:13:10 +00:00
nobu de870875f7 vm_eval.c: rb_current_receiver
* vm_eval.c (rb_current_receiver): new function to return the
  receiver in the current control frame.  [Feature #10195]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-16 10:38:15 +00:00
nobu b1acfbc121 ext/-test-/proc/super.c: rename
* ext/-test-/proc/super.c: renamed the file and maker method.
  [Feature #10195]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-16 10:11:28 +00:00
normal e96274f604 test/ruby/test_io.rb: remove unnecessary begin/end
Unnecessary since r47422 when the "rescue IOError" clause
was removed.

* test/ruby/test_io.rb (test_readpartial_locktmp):
  remove unnecessary begin/end

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-16 02:09:22 +00:00
akr c2e0827421 add an assertion.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-15 15:33:34 +00:00
kou 9f4ab1c69d * test/rexml/test_document.rb: Indent.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-15 12:29:21 +00:00
kou 64f9f1ba58 * test/rexml/test_document.rb
(REXMLTests::TestDocument::EntityExpansionLimitTest):
  Group tests by general entity and parameter entity.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-15 11:47:34 +00:00
kou a38971c595 * test/rexml/test_document.rb
(REXMLTests::TestDocument::EntityExpansionLimitTest): Define
  test XML in each test method because (1) each XML in used only
  one test and (2) related data and code should be close.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-15 11:45:27 +00:00
kou a5406b873c * test/rexml/test_document.rb
(REXMLTests::TestDocument::EntityExpansionLimitTest):
  Use one test method for one test.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-15 11:40:47 +00:00
kou a4a2fbdf64 * test/rexml/test_document.rb
(REXMLTests::TestDocument::EntityExpansionLimitTest): Use
  setup and teardown instead of ensure in test.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-15 11:17:33 +00:00
kou 9fb2d21d7d * test/rexml/test_document.rb
(REXMLTests::TestDocument::EntityExpansionLimitTest): Indent.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-15 11:13:31 +00:00
kou f2588e1c8e * test/rexml/test_document.rb (REXMLTests::TestDocument): Group
entity expansion limit related tests.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-15 11:12:20 +00:00
kou 1e326bb0e5 * test/rexml/test_document.rb (REXMLTests::TestDocument::BomTest):
Fix wrong parent class. It doesn't need inherit tests in
  TestDocument class.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-15 11:09:57 +00:00
nobu 558b9191c0 vm_eval.c: UncaughtThrowError
* vm_eval.c (rb_throw_obj): throw UncaughtThrowError instead of
  ArgumentError.  [Feature #10480]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-15 07:28:08 +00:00
shugo 772e9778fb * lib/net/imap.rb (search_response): parse MODSEQ in SEARCH
responses properly.  [ruby-core:64203] [Bug #10112]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-13 16:32:15 +00:00
akr fb2008a73a * test/lib/envutil.rb: Moved from test/ruby/.
* test/lib/find_executable.rb: Ditto.

* test/lib/memory_status.rb: Ditto.

* test/lib/test/unit.rb: require envutil.

* test/: Don't require envutil in test files.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-13 16:05:37 +00:00
nagachika 2e8f953d68 * lib/rexml/document.rb: add REXML::Document#document.
reported by Tomas Hoger <thoger@redhat.com> and patched by nahi.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-13 13:29:50 +00:00
akr b19c39f94f * test/monitor/test_monitor.rb: Use assert_join_threads.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-13 13:04:43 +00:00
akr 3864eb828b * test/openssl: Don't specify port number.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-13 12:46:58 +00:00
akr 1e502d2a10 * test/openssl/ssl_server.rb: Unused file removed.
It is not used since r16111, Ruby 1.9.1.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-13 12:28:12 +00:00
headius 787b98e365 * test/bigdecimal/test_bigdecimal.rb: Add test for mult by nil.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-13 05:31:00 +00:00
nobu 9efb9195e0 test_unicode_normalize.rb: skip only once
* test/test_unicode_normalize.rb (setup): skip only once, and
  silently ignore other tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-11 23:54:45 +00:00
nobu 16d2f2803f test_unicode_normalize.rb: skip if not found
* test/test_unicode_normalize.rb (read_tests): do nothing if the
  test data file is not found.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-11 23:06:53 +00:00
akr ae831861be * test/ruby/test_object.rb: Specify an exception class for rescue clause.
* test/dbm/test_dbm.rb: Ditto.

* test/gdbm/test_gdbm.rb: Ditto.

* test/sdbm/test_sdbm.rb: Ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-11 15:28:17 +00:00
akr 801c8ab026 * test/fileutils/test_fileutils.rb: Use assert_join_threads.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-11 14:44:18 +00:00
akr 08bb9482a0 * test/resolv/test_dns.rb: Use assert_join_threads.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-11 13:51:39 +00:00
akr 1fca7620dc * test/net/pop/test_pop.rb: Use assert_join_threads.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-11 13:33:46 +00:00
akr 7bb546a2a1 * test/net/http/test_https_proxy.rb: Use assert_join_threads.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-11 13:08:01 +00:00
naruse 7b4383a2a9 remove debug code
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-11 06:22:34 +00:00
naruse 05eb6111d9 * lib/rubygems/commands/contents_command.rb (files_in_default_gem):
remove useless sort. show_files will sort the result and
  another branch, files_in_gem, doesn't sort.
  it should be removed for consistency.

* test/rubygems/test_gem_commands_contents_command.rb
  (test_execute_default_gem): adjust the sort algorithm with
  Gem::Commands::ContentsCommand#show_files, which sort items
  as array of [prefix, basename] not strings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-11 05:08:59 +00:00
akr 976574413a * test/net/imap/test_imap.rb: Don't ignore exceptions on server
threads.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-10 15:22:29 +00:00
akr 9bf5457481 * test/net/ftp/test_ftp.rb (create_ftp_server): Don't ignore
exceptions on server thread.
  Delete read_timeout method call to fix NoMethodError.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-10 14:40:00 +00:00
akr 33bb38a644 * lib/webrick/server.rb: Setup shutdown pipe in listen method.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-10 11:05:00 +00:00
usa fd9f6bde95 * win32/win32.c, include/win32/win32.h (rb_w32_set_nonblock): new
function to support nonblock-mode of pipes.

* win32/win32.c (rb_w32_read): nonblock-mode pipe returns ERROR_NO_DATA
  if there is no data, but also returns it if remote-end is closed.

* win32/win32.c (rb_w32_write): if cannot to write any data, it may be
  blocking.

* io.c (rb_io_set_nonblock): use rb_w32_set_nonblock for Windows.

* ext/io/nonblock/nonblock.c (rb_io_nonblock_set): use ruby's API when
  setting nonblock-mode.

* test/ruby/test_io.rb: test nonblock pipes on Windows.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-10 10:42:19 +00:00
nobu 6ccf3d68c2 win32.c: login name encoding
* ext/etc/etc.c (etc_getlogin): set login name encoding properly.
  [ruby-core:66163] [Bug #10493]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-10 08:24:36 +00:00
nobu 79c0b7fcc8 unicode_normalize: UNICODE_VERSION constant
* template/unicode_norm_gen.tmpl (UnicodeNormalize): embed the
  version of Unicode data files used to generate.

* test/test_unicode_normalize.rb (TestUnicodeNormalize): use the
  embedded version to load the test data.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-10 06:56:41 +00:00
akr 2a9ea11355 * lib/webrick/server.rb (initialize): Initialize shutdown pipe here
to avoid race condition.
  (cleanup_shutdown_pipe): New private method.
  (cleanup_listener): Extracted from shutdown method.
  Call this method from start method to avoid race condition.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-09 23:03:40 +00:00
akr ed50872b30 * test/webrick/webrick.cgi: Don't use debug mode.
* test/webrick/webrick_long_filename.cgi: Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-09 20:58:22 +00:00
nobu 770128ade3 test_bmethod.rb: block in bmethod test
* test/-ext-/proc/test_bmethod.rb (test_super_in_bmethod): block
  in bmethod test for [Feature #10195].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48350 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-09 14:58:33 +00:00
nobu 71c8cf27db test_bmethod.rb: super in bmethod test
* test/-ext-/proc/test_bmethod.rb (test_super_in_bmethod): super
  in bmethod test for [Feature #10195].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-09 14:33:19 +00:00
akr ad58f04833 * test/open-uri: Test server log in server thread.
* test/webrick: Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-09 14:01:20 +00:00
kazu b550034c8b Fix typos in assert messages [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-09 13:12:14 +00:00
akr b0132150c6 * test/webrick: Fix the argument order of assert_equal.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-09 12:16:38 +00:00
akr 070c310e87 * test/webrick: Store log in an array.
* test/net/http: Ditto.

* test/open-uri: Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48341 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-09 11:51:06 +00:00
akr 5ab3fe5fb5 * test/xmlrpc: Refine log test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-09 09:36:33 +00:00
akr b30ff6839d * test/xmlrpc: Use assert_join_threads.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-09 09:07:41 +00:00
akr a4b5982b4c * test/xmlrpc: Test webrick error log is empty.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-09 05:06:44 +00:00
akr 0babd24827 * test/net/http: Examine webrick log.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-09 02:49:13 +00:00
akr ee0b5fbd53 Fix previous change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-09 01:17:14 +00:00
akr 7044cea301 * test/webrick: Refine log tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-09 00:51:12 +00:00
akr 179fde39ef * test/net/http/utils.rb: Don't connect to spawned server
before actual test.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-08 17:06:10 +00:00
akr 742bbbb01b * test/webrick: Examine log and use assert_join_threads.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-08 15:38:33 +00:00
akr 8222432c9d Use assert_join_threads.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-08 13:41:49 +00:00
nobu 72ce1a4759 test_exception.rb: more tests
* test/ruby/test_exception.rb: more tests for catch and throw.
  catch but no throw, autogenerated tag, and uncaught throw.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-07 12:08:24 +00:00
nobu 1f53145dd4 pack.c: escape and encoding
* pack.c (pack_pack): escape unprintable characters and preserve
  the encoding of warning message.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-06 14:58:43 +00:00
nobu fa892d27af test_pack.rb: test_invalid_warning
* test/ruby/test_pack.rb (test_invalid_warning): add test for
  invalid directive warnings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-06 14:55:44 +00:00
akr 8f1b3a799f * test/test_unicode_normalize.rb: Rename TestNormalize to
TestUnicodeNormalize.
  Define constants under TestUnicodeNormalize.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-06 12:45:15 +00:00
akr 600b913232 * test/open-uri/test_open-uri.rb: Check empty webrick log.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-06 12:23:22 +00:00
akr f4c848e158 * test/open-uri/test_open-uri.rb: Don't ignore webrick's log.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-05 14:29:46 +00:00
nobu 3614f8bd1c string.c: wchar terminator
* string.c (rb_str_lstrip_bang, rb_str_rstrip_bang): terminate
  wchar strings with wchar 0.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-05 01:54:22 +00:00
usa 7343f15302 * test/rubygems/test_gem_request_set_lockfile.rb
(test_relative_path_from): driveletter support.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-04 12:05:26 +00:00
nobu f6616071dc test_gem_remote_fetcher.rb: leaked FDs
* test/rubygems/test_gem_remote_fetcher.rb (RemoteFetcherCleanup):
  close all pooled connections for each tests to fix leaked file
  descriptors.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-04 07:23:59 +00:00
nobu 7b011fd11e * ext/-test-/printf/printf.c, test/-ext-/test_printf.rb: remove
test for snprintf(3).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-04 05:03:50 +00:00
akr 5998b9d68f * test/openssl/utils.rb: The default of :ignore_listener_error is
changed to false.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-03 09:10:28 +00:00
naruse 21ab98a997 * lib/uri/rfc3986_parser.rb (URI::RFC3986_Parser::RFC3986_URI):
allow '[' and ']' for URI input (and escape). [Bug #10402]

* lib/uri/generic.rb (URI#query=): escape '[', '\', and ']'.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-03 00:33:47 +00:00
ko1 5d1f152fa3 * test/ruby/test_method.rb: r48239 makes this test green.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-02 18:40:45 +00:00
akr e6aac32abf * test/openssl/test_ssl.rb: Don't ignore errors on listener threads,
as much as possible.

* test/openssl/test_ssl_session.rb: Ditto.

* test/openssl/test_partial_record_read.rb: Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-01 16:32:59 +00:00
akr a25e9259d5 ignore_ssl_accept_error option is changed to ignore_listener_error.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-01 15:56:29 +00:00
akr aa46754bc9 comment updated.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-01 15:35:31 +00:00
akr 88c37cdcc3 start_server refined.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-01 14:53:32 +00:00
akr 3ec72f078c * test/openssl/utils.rb (start_server): Don't close sockets before
threads finished.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-01 14:12:11 +00:00
akr f4b417eb43 refine message of assert_join_threads.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-01 13:29:18 +00:00
akr d5802c512e * test/openssl/test_ssl_session.rb (test_ctx_client_session_cb): Don't
ignore errors of SSL accept.
  (test_ctx_server_session_cb): Ditto.

* test/openssl/utils.rb (server_loop): Add ignore_ssl_accept_error
  argument.
  (start_server): Refine threads waits.

* test/ruby/envutil.rb (assert_join_threads): Show a thread before
  backtrace.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-01 13:10:37 +00:00
akr a7c425cbf3 * test/openssl/utils.rb (start_server, server_loop): Use a
pipe to stop server instead of shutdown/close a listening socket.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-01 11:41:30 +00:00
akr bfd540cd75 * test/ruby/envutil.rb (assert_join_threads): New assertion to
join multiple threads without exceptions.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-01 10:25:57 +00:00
nobu b5ba1dcdf0 parse.y: invalid instance/class variable names
* parse.y (parse_atmark): mere atmark and two atmarks without
  succeeding identifiers are invalid as instance/class variable
  names.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-01 06:45:17 +00:00
tenderlove 07308c4d30 * ext/dl/*: remove DL as it is replaced by Fiddle.
[Feature #5458] Thanks to Jonan Scheffler <jonanscheffler@gmail.com>
  for this patch

* test/dl/*: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-31 21:13:09 +00:00
headius 88326272bc * test/openssl/test_ssl.rb: Add certificate verification chain
test from JRuby community.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-31 20:49:51 +00:00
headius 08d0b57000 * test/psych/test_emitter.rb: Fix line_width test...initial value
is impl-specific and attr assignment always returns LHS.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-31 19:37:38 +00:00
knu c02fa39463 Make Digest() thread-safe.
* ext/digest/lib/digest.rb (Digest()): This function should now be
  thread-safe.  If you have a problem with regard to on-demand
  loading under a multi-threaded environment, preload "digest/*"
  modules on boot or use this method instead of directly
  referencing Digest::*. [Bug #9494]
  cf. https://github.com/aws/aws-sdk-ruby/issues/525

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-31 13:21:51 +00:00
knu 2172b44898 * test/digest/test_digest.rb: Drop #!. This no longer runs
stand-alone because it depends on ruby/envutil.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-31 13:12:44 +00:00
nobu 26c13db6e6 test_time.rb: test_iso8601
* test/test_time.rb (TestTimeExtension#test_iso8601): run all
  xmlschema tests with iso8601 method, and fix the test name.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-31 08:07:46 +00:00
hsbt f288185d46 * test/test_unicode_normalize.rb: added unicode version number to
test data location.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-31 00:59:25 +00:00
nobu e95e524782 vm_insnhelper.c: allow to_ary
* vm_insnhelper.c (vm_callee_setup_arg{_complex,}): try conversion
  by to_ary for a lambda, as well as a proc.
  [ruby-core:65887] [Bug #9605]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-30 02:16:15 +00:00
nobu 049bbd72e3 parse.y: reset current_arg after block var
* parse.y (block_param_def): reset current_arg after block
  parameter definition, not to warn references in that block body.
  [ruby-core:65990] [Bug #10314]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-29 15:01:49 +00:00
nobu 6fe9b2b794 parse.y: warn iside a block
* parse.y (gettable_gen): also warn circular argument reference even
  inside a block.  [ruby-core:65990] [Bug #10314]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-29 14:24:24 +00:00
nobu 98ea627561 parse.y: warn circular argument reference
* parse.y (gettable_gen): warn circular argument reference, for
  transition from 2.1 and earlier.  [ruby-core:65990] [Bug #10314]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-29 12:13:26 +00:00
nobu ef276e959e load.c: transcode path
* load.c (rb_f_load): path name needs to be transcoded to OS path
  encoding.  [ruby-list:49994]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-29 05:44:33 +00:00
nobu 5de3e7e2bd test_require.rb: rename
* test/ruby/test_require.rb (test_load_scope): rename and add
  failure message.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-29 05:44:20 +00:00
marcandre aa87ea9915 * lib/matrix.rb: Generalize Vector#cross_product to arbitrary dimensions
based on a patch by gogo tanaka [#10074]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-29 02:43:52 +00:00
marcandre 764524f65b * lib/matrix.rb: Add Matrix#adjucate
patch by gogo tanaka [#10056]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-29 02:43:28 +00:00
marcandre dc38c87779 * lib/matrix.rb: Add aliases for Vector#cross & dot
patch by gogo tanaka [#10352]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-29 02:42:56 +00:00
nobu 4079a35447 ruby.c: no -r when dump
* ruby.c (process_options, load_file_internal2): should not
  require other files when dump option is given.
  [ruby-dev:48712] [Bug #10435]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-28 07:22:43 +00:00
usa 9cdd297a29 * lib/rexml/entity.rb: keep the entity size within the limitation.
reported by Willis Vandevanter <will@silentrobots.com> and
  patched by nahi.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-27 11:18:02 +00:00
nobu e45b215fdd proc.c: fix method proc binding receiver
* proc.c (method_proc): the receiver of binding from method should
  be same as the receiver of the method.
  [ruby-core:65917] [Bug #10432]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-27 08:17:26 +00:00
ko1 ed8da2d12a * test/ruby/test_super.rb: add a test to check block passing.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-27 07:29:32 +00:00
nobu ce9fc203d1 test_parser_events.rb: split test_binary
* test/ripper/test_parser_events.rb (test_binary): split for each
  operators.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-27 05:53:22 +00:00
normal bebd27b097 test/ruby/test_process.rb: reduce garbage during forks
* test/ruby/test_process.rb (test_deadlock_by_signal_at_forking):
  reduce garbage during forks

This seems to reduce failures on my memory-constrained VM
when doing a full test-all.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-27 02:33:51 +00:00
nobu d1ec43ae7a parse.y: Ripper.sexp returns error
* ext/ripper/lib/ripper/sexp.rb (Ripper.sexp, Ripper.sexp_raw):
  return nil on error.  [ruby-dev:48678] [Bug #10405]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-26 03:24:18 +00:00
akr 26d56b7dc8 A test renamed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-25 23:20:08 +00:00
akr 1fe90db538 * io.c (io_binwrite_string): Test writev() failure.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-25 13:34:21 +00:00
duerst 96d375540f test/test-unicode_normalize.rb: added test_us_ascii.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-25 11:19:22 +00:00
svn 6e9ff5a892 * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-25 11:01:07 +00:00
duerst bdea9273ca test/test-unicode_normalize.rb: added test_raise_exception_for_non_unicode_encoding.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-25 11:01:05 +00:00
duerst b3494924b6 test/test-unicode_normalize.rb: removed unused function.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-25 10:30:36 +00:00
nobu 26143970c1 rake/cpu_counter.rb: use Etc.nprocessors
* lib/rake/cpu_counter.rb (count): prefer Etc.nprocessors, which
  is hundreds times faster.

* test/rake/test_rake_cpu_counter.rb: add tests for features, and
  remove useless tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-25 03:52:46 +00:00
nobu 5940b1f6fc parse.y: fix fluent interface identifier
* parse.y (parser_yylex): dispatch newline and space at fluent
  interface, so that the following identifier does not include the
  space.  [ruby-dev:48684] [Bug #10411]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-24 13:49:44 +00:00
nobu b5f3b4cb09 test_object.rb: for r48118
* test/ruby/test_object.rb: assertion for r48118.  defined method
  should be called.  [Bug #10421]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-23 16:23:46 +00:00
nobu d4c22161f3 test/-ext-/hash/test_delete.rb: assert deleted values
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-23 14:18:32 +00:00
nobu ca7835bec6 hash.c: rb_hash_delete does not call the block
* hash.c (rb_hash_delete): now does not call the block given to
  the current method.  [ruby-core:65861] [Bug #10413]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-23 12:42:57 +00:00
nobu d8918fa6b5 test_unicode_normalize.rb: show error messages
* test/test_unicode_normalize.rb (generate_test_normalize): defer
  building explicit error messages until assertion failed.  this
  is 3% slower than @@debug = false.

  (generate_test_check_true): ditto.
  (generate_test_check_false): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-23 12:36:25 +00:00
nobu 3d86412335 test_object.rb: avoid confusing ruby-mode.el
* test/ruby/test_object.rb: get rid of confusing ruby-mode.el
  string highlight.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-23 10:16:24 +00:00
nobu 8dc89b34c1 vm_method.c: no redefinition warnings for undefined methods
* vm_method.c (rb_method_entry_make): warn redefinition only for
  already defined methods, but not for undefined methods.
  [ruby-dev:48691] [Bug #10421]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-23 10:13:29 +00:00
kou 93647e81a6 * lib/rexml/source.rb (REXML::IOSource#encoding_updated): Fix a
bug that can't parse XML correctly when
  Encoding.default_internal is different with XML
  encoding. REXML::Source converts XML encoding on read. So IO
  should not convert XML encoding.
  Based on patch by NAKAMURA Usaku.
  [ruby-dev:48686] [Bug #10418]

* test/rexml/test_encoding.rb
  (REXMLTests::EncodingTester#test_parse_utf16_with_utf8_default_internal):
  Add the for the above case.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-23 08:23:10 +00:00
kou f6c56982ab * test/rexml/test_encoding.rb
(REXMLTests::EncodingTester#test_parse_utf16): Use meaningful
  test name. "ticket" in the old test name means the ticket in
  REXML's issue tracker. The REXML's issue tracker was gone. So
  "ticket" is meaningless.

* test/rexml/data/ticket_110_utf16.xml: Rename to ...
* test/rexml/data/utf16.xml: ... this.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-23 07:31:31 +00:00
kou 7a608ada8f * test/rexml/test_encoding.rb
(REXMLTests::EncodingTester#test_ticket_110): Fix expected and
  actual order.
  Patch by NAKAMURA Usaku. Thanks!!!


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-23 07:26:39 +00:00
normal a8ed25ea12 test/ruby/test_process.rb: use io/wait instead of timeout
Occasionally I get timeout errors during this test on an
overloaded system, so we may need to increase timeouts anyways.
For now, avoid the overhead of thread creation for every read we
do.

* test/ruby/test_process.rb (test_deadlock_by_signal_at_forking):
  use IO#wait_readable instead of timeout

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-23 01:37:04 +00:00
normal 000e2b816d test/ruby/test_process.rb: ensure exit! on fork failure
* test/ruby/test_process.rb (test_deadlock_by_signal_at_forking):
  ensure exit! on fork failure

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-23 01:36:55 +00:00
nobu 67121b5060 class.c: delete expected keywords directly
* class.c (unknown_keyword_error): delete expected keywords
  directly from raw table, so that the given block is not called.
  [ruby-core:65837] [Bug #10413]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-22 18:41:54 +00:00
usa 86f5f02677 * test/test_unicode_normalize.rb: set encoding when reading.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-22 11:03:23 +00:00
nobu 8491998165 test/test_unicode_normalize.rb: don't set default encodings globally
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-22 10:55:13 +00:00
usa 6dd2a4810e * test/test-unicode_normalize.rb: as often said, ruby is sometimes built
at non-srcdir.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-22 09:14:24 +00:00
duerst 84f9fa8773 test/test-unicode_normalize.rb: Adjusted path for test data file (now ../enc/unicode/data/NormalizationTest.txt).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-22 09:12:14 +00:00
duerst 30b837b47c test/test-unicode_normalize.rb: Removed explicit require, changed method names, adjusted copyright.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-22 09:06:49 +00:00
duerst 15bfe2793a test/test-unicode_normalize.rb: Importing from
https://github.com/duerst/eprun/blob/master/test/test_normalize.rb.
(removing trailing whitespace, fixing EOLs and adding EOL property)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-22 09:00:04 +00:00
nobu 3136025cd1 test_module.rb: test with UTF-8
* test/ruby/test_module.rb (test_uninitialized_instance_variable):
  test with UTF-8 default external encoding for non-locale
  environments.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-20 07:38:53 +00:00
nobu bd2d094aab vm_insnhelper.c: preserve encoding
* vm_insnhelper.c (vm_getivar): preserve variable name encoding in
  warning message.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-20 05:20:39 +00:00
ktsj 231f45ad36 * vm_core.h, vm.c, proc.c: fix GC mark miss on bindings.
[ruby-dev:48616] [Bug #10368]

* test/ruby/test_eval.rb: add a test code.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-18 11:46:31 +00:00
akr 108627d911 * pack.c (pack_unpack): Add casts for char references for 'u'.
Fix line ending recognition algorithm.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-17 14:28:34 +00:00
akr 0d4185f30e * Avoid undefined behaviors found by gcc -fsanitize=undefined.
gcc (Debian 4.9.1-16) 4.9.1

* string.c (rb_str_sum): Avoid undefined behavior.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47997 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-17 09:49:28 +00:00
nobu a2797a454c re.c: mak eregexps with binary escapes ASCII-8BIT
* re.c (unescape_nonascii): make dynamically compiled US-ASCII
  regexps ASCII-8BIT encoding if binary (hexadecimal, control,
  meta) escapes are contained, as well as literal regexps.
  [ruby-dev:48626] [Bug #10382]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-17 06:06:43 +00:00
normal 585e1594c9 Revert r47971, r47972 [ruby-core:65764]
The current implementation currently delivers signals to self
immediately and synchronously, so we do not need explicit,
potentially-confusing sleeps to wait for signal delivery.

* test/-ext-/bug_reporter/test_bug_reporter.rb
  (test_bug_reporter_add): revert r47972
* test/ruby/test_rubyoptions.rb (test_segv_test): revert r47971
  [ruby-core:65764]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-16 18:11:49 +00:00
akr 6338a3a4a4 Set an encoding for SEGV message.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-16 13:18:44 +00:00
akr 4c02456b3d Set ASCII-8BIT encoding.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-16 12:27:43 +00:00
akr 53da7250ed * test/ruby/envutil.rb (assert_pattern_list): Show number of matched
patterns and characters.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-16 11:18:06 +00:00
nobu 04e5c65ff7 parse.y: do not use disposed string
* parse.y (parser_here_document): do not append already appended
  and disposed code fragment.  [ruby-dev:48647] [Bug #10392]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-16 06:05:03 +00:00
normal eec651a05e test/-ext-/bug_reporter/test_bug_reporter.rb: fix race
Signal delivery is not immediate, so wait for signal delivery.

* test/-ext-/bug_reporter/test_bug_reporter.rb
  (test_bug_reporter_add): fix race

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-16 02:01:51 +00:00
normal 720ef2546d test/ruby/test_rubyoptions.rb: fix race
Signal delivery is not guaranteed to be immediate, a process may
exit before receiving signal it sent itself.

* test/ruby/test_rubyoptions.rb (test_segv_test): fix race

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-16 01:10:53 +00:00
normal e03546fd4c test/ruby/test_process.rb: avoid killing wrong parent
We must capture intended target PID before forking, since
Process.ppid may change if parent dies (e.g. due to timeout)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-16 00:06:09 +00:00
akr 1451377e75 Simplify multiline condition.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-15 11:28:52 +00:00
akr e67b307e55 Simplify a regexp.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47941 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-15 10:57:17 +00:00
akr ac7190349c Unused variable removed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-15 09:57:17 +00:00
akr e1ba2d418a * test/ruby/envutil.rb (assert_pattern_list) Renamed from
assert_regexp_list.
  Show multiline string in multi lines.

* test/-ext-/bug_reporter/test_bug_reporter.rb: Use
  assert_pattern_list.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-15 08:59:46 +00:00
nobu 723cee93c4 enum.c: nil if no iteration
* enum.c (enum_inject): return nil if no iteration, instead of
  Qundef.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-15 06:27:30 +00:00
nobu e02c5f346f test_rubyoptions.rb: split regexps
* test/ruby/test_rubyoptions.rb (SEGVTest::ExpectedStderrList):
  split backtrace information regexps.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-15 05:59:11 +00:00
akr 2386407223 * test/ruby/envutil.rb (assert_regexp_list): New assertion method.
* test/ruby/test_rubyoptions.rb: Use assert_regexp_list.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-15 03:27:37 +00:00
akr 7643c2b37d Extract assert_segv and split the big regexp.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-15 00:04:50 +00:00
normal d63a88c0b5 test/ruby/test_optimization.rb (test_string_size): new test
String#size may be overridden, so test for it.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-14 22:01:54 +00:00
normal a1ad7b51f5 test/ruby/test_optimization.rb: redefinition tests for String
* test/ruby/test_optimization.rb (test_string_eq_neq): new test
  (test_string_ltlt): ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-14 21:52:56 +00:00
normal 5733a57455 test/ruby/test_optimization.rb (test_hash_aset_with): assert assignment
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-14 21:52:45 +00:00
normal 18828191d4 test new optimizations for redefines
* test/ruby/test_optimization.rb (test_string_freeze): new test
  (test_hash_aref_with): ditto
  (test_hash_aset_with): ditto

Our new (in 2.2) optimizations must not trigger when redefined.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-14 01:21:48 +00:00
akr 450307e383 * enum.c (nmin_run): max(n) and max_by(n) returns an array in
descending order.
  [ruby-core:65452] Suggested by David Grayson.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-13 16:30:07 +00:00
nobu 37d0c873f6 parse.y: should not eliminate value nodes
* parse.y (remove_duplicate_keys): should not simply eliminate all
  value nodes, which may have side effects.
  [ruby-core:65625] [Bug #10315]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-12 17:39:29 +00:00
akr 178bc9a0e7 * test/lib/test/unit.rb: Hide skips by default.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-12 00:24:40 +00:00
nobu 8771d1a0fc vm.c: precedence of duplicated keys
* vm.c (kwmerge_i): override existing keys by new keys.
  [ruby-core:65368] [Bug #10315]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-11 04:46:56 +00:00
nobu 1571682719 parse.y: precedence of duplicated keys
* parse.y (assocs): concatenate splatted literal hashes.  the
  former key has precedence even if duplicated literal keys
  follow.  [ruby-core:65368] [Bug #10315]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-11 04:46:42 +00:00
normal 9559b04e3d open-uri: accept :open_timeout option
* lib/open-uri.rb (OpenURI::Options): add :open_timeout default
* (def OpenURI.open_http): check :open_timeout option
* (module OpenURI): rdoc for :open_timeout
* test/open-uri/test_open-uri.rb (test_open_timeout): new test
  [Feature #10361]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-10 19:15:56 +00:00
normal f8b219e4d6 st: test packed-to-unpacked transitions during iteration
The st_foreach and st_foreach_check functions support transitioning
from a packed to an unpacked state during iteration.  However, this
functionality did not get exercised by the current test suite until
now.  This should help us prevent breakage when making modifications
to st.

* ext/-test-/st/foreach/extconf.rb: new file
* ext/-test-/st/foreach/foreach.c: ditto
* test/-ext-/st/test_foreach.rb: ditto
  [Feature #10321]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-09 07:16:19 +00:00
hsbt 34b1a9913a * test/ruby/test_syntax.rb: added syntax tests of underscore arguments.
[Feature #10340][ruby-core:65496]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-08 07:36:52 +00:00
marcandre a2ae7bccf8 * lib/matrix.rb: Add @- and @+ for Matrix and Vector.
patch by gogo tanaka [#10068] [#10069]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-07 20:18:35 +00:00
normal 9bb7dfa247 normalize reference to Timeout::Error
From: John Bachir <j@jjb.cc>

* bootstraptest/test_io.rb (assert_finish):
  normalize rescue for Timeout::Error
* lib/net/ftp.rb (Net#read_timeout): ditto for doc
* lib/resolv.rb (Resolv::ResolvTimeout): ditto for subclass
* lib/webrick/httprequest.rb (_read_data): ditto for rescue
* sample/timeout.rb (p timeout): ditto for call
* test/drb/drbtest.rb (test_06_timeout): ditto
* test/ruby/test_readpartial.rb (test_open_pipe): ditto
* test/thread/test_queue.rb (test_queue_thread_raise): ditto
* thread.c (rb_thread_s_handle_interrupt): ditto for doc
  [ruby-core:65481] [misc #10339]

TimeoutError is a legacy constant, Timeout::Error is the canonical constant.
This patch normalizes all code and comments to reference Timeout::Error.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-07 20:00:09 +00:00
odaira 554577015f test/ruby/test_process.rb (TestProcess#test_setsid): AIX does not allow Process::getsid(pid) when pid is in a different session
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-07 19:40:13 +00:00
odaira 185c85b26e test/ruby/test_rubyoptions.rb (TestRubyOptions#test_encoding): On AIX, locale_charmap is ISO-8859-1 with LANG=C. This means the source encoding of stdin is ISO-8859-1, so "invalid multibyte char" error does not occur
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-07 19:33:48 +00:00
marcandre 56d5728589 * lib/matrix.rb: Add Matrix#laplace_expansion.
patch by gogo tanaka [#10073]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-07 19:30:48 +00:00
marcandre eb9c3e7120 * lib/matrix.rb: Add Vector.basis.
Based on patch by gogo tanaka [#10072]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-07 19:29:53 +00:00
nobu 2ebafed88a signal.c: get rid of deadlock by discarded signals
* signal.c (rb_f_kill): get rid of deadlock as unhandled and
  discarded signals do not make interrupt_cond signaled.
  based on the patch by Kazuki Tsujimoto at [ruby-dev:48606].
  [Bug #9820]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-07 14:40:16 +00:00
nobu 998befe8e6 signal.c: send signal unless handled
* signal.c (rb_f_kill): should not ignore signal unless the
  default handler is registered.  [ruby-dev:48592] [Bug #9820]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-06 07:23:06 +00:00
nobu 559154310f test_string.rb: enable huge test only on possible platforms
* test/ruby/test_string.rb (test_LSHIFT_neary_long_max): enable
  only on platforms where string size range is smaller than memory
  space.  this test does not make sense but just wastes memory and
  time on other platforms, as it is hardly possible that a string
  size becomes neary LONG_MAX if long size equals pointer size.
  [ruby-core:65410] [Bug #10325]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-06 07:06:49 +00:00
nobu 27ce2d1328 test_gem_source_git.rb: drop intended error message
* test/rubygems/test_gem_source_git.rb (test_rev_parse): dispose
  error message by git, which should be intended.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-04 12:31:34 +00:00
odaira 11ad7c4dbe test/test_syslog.rb (TestSyslog#test_log): In AIX, each output line of LOG_PERROR to stderr has an additional empty line appended, so skip that line.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-04 07:35:43 +00:00
odaira bebb4e9dea test/socket/test_unix.rb (TestSocket_UNIXSocket#test_too_long_path): sockaddr_un.sun_path in AIX is defined as char[1024], so "a" * 300 is not too long. "a" * 3000 would be enough.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-04 07:11:54 +00:00
hsbt 5207d9f158 * test/ruby/test_io.rb (TestIO#test_advise): avoid to infinite loop.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-03 12:02:49 +00:00
hsbt 66b6179ec1 * test/ruby/test_io.rb (TestIO#test_advise): added workaround of fadvise(2)
with tmpfs and old linux kernel. [ruby-core:65355][Bug #10313]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-03 09:52:21 +00:00
marcandre 5b46b07bf3 * lib/matrix.rb: Add hstack & vstack methods.
Based on a patch by creasywuqiong. [Fix GH-344]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-03 03:44:20 +00:00
marcandre f59098d118 * lib/matrix.rb: Fix Matrix.rows copy bug.
Patch by Arron Mabrey. [Fix GH-707]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-03 03:38:06 +00:00
akr fe18cd011c test_advice show OS and filesystem when failed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-02 08:57:44 +00:00
akr 7b25bd8ba2 * ext/etc/etc.c (etc_nprocessors): New method.
Accepted by matz at RubyKaigi 2014.
  [ruby-core:65142] [Feature #10267]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-02 03:23:26 +00:00
odaira f17b95f21c test/fileutils/test_fileutils.rb: AIX does not allow a sticky bit on a regular file.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-01 08:48:17 +00:00
drbrain cec4f5a9e0 * lib/rubygems: Update to RubyGems 2.4.2.
* test/rubygems:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-01 08:30:21 +00:00
nobu ffe920d674 parse.y: separate ripper data type
* parse.y (parser_data_type): separate ripper data type for from
  parser.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-30 13:25:28 +00:00
glass a4645e5612 * lib/uri/rfc3986_parser.rb: raise URI::InvalidURIError when
uri doesn't respond to #to_str. [ruby-core:64453] [Bug #10150]

* test/uri/test_parser.rb: test for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-27 03:13:22 +00:00
nobu 15ae462d8b digest.c: typed data
* ext/digest/digest.c (rb_digest_base_alloc): use typed data.

* ext/digest/digest.c (rb_digest_base_copy): fail unless original
  object has same algorithm.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-27 01:30:16 +00:00