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

8083 Коммитов

Автор SHA1 Сообщение Дата
nobu 4d426fc2e0 test_basicsocket.rb: do not hardcode port number
* test/socket/test_basicsocket.rb (socks): use dynamically chosen
  port number, and remove never used argument.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-13 23:37:05 +00:00
headius d739458b71 * test/socket/test_basicsocket.rb: Remove unused constant.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-13 23:35:23 +00:00
svn 2705eeea16 * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-13 23:22:31 +00:00
headius 4eacd5debc * test/socket/test_basicsocket.rb: Add basic tests for close_read
and close_write using TCPServer/Socket as a target.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-13 23:22:17 +00:00
hsbt 8f37674ffd * ext/json, test/json: merge JSON HEAD(259dee6)
separate imprementation of Typed_Data macro.
  https://github.com/flori/json/compare/v1.8.1...v1.8.2

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-13 12:08:28 +00:00
nobu b4089826fb test_http.rb: test without DNS access
* test/net/http/test_http.rb: get rid of accessing DNS actually
  for some servers returning wrong results.
  [ruby-core:67454] [Bug #10721]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-13 05:16:37 +00:00
nobu 6b8b66b401 range.c: class name encoding
* range.c (range_bsearch): preserve encoding of class name in an
  exception message.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-13 03:47:55 +00:00
usa 14804d6b09 * test/ruby/test_numeric.rb (TestNumeric#test_coerce): fixed wrong message.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-12 14:09:13 +00:00
normal 34289fff0f numeric.c: correct error message when coerce fails
* numeric.c (bit_coerce): use original value for error message
  [ruby-core:67405] [Bug #10711]
* test/ruby/test_numeric.rb (test_coerce): check error message

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-12 09:56:14 +00:00
nobu 77f3125567 rdoc/text.rb: fix infinite loop
* lib/rdoc/text.rb (expand_tabs): get rid of infinite loop with
  CR.  should check if substitution occurred too.
  [ruby-dev:48813] [Bug #10732]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-12 09:01:28 +00:00
nobu 1abd51ad91 vm_method.c: NameError at refined method alias
* vm_method.c (rb_alias): raise a NameError when creating alias to
  a refined method if the original method of the refined method is
  not defined.  [ruby-core:67523] [Bug #10731]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-12 07:45:49 +00:00
nobu 4d69e03b66 array.c: class name encoding
* array.c (rb_ary_bsearch): preserve encoding of class name in an
  exception message.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-11 23:48:10 +00:00
akr 57b87a00f8 [DOC]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-11 15:58:40 +00:00
nobu 7c4d749d18 test_utils.rb: dynamically chosen port number
* test/webrick/test_utils.rb (test_create_listeners): use
  dynamically chosen port number, not hardcoded port number.
  [ruby-core:67508]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-11 06:11:40 +00:00
nobu 7dddd592d1 test/unit.rb: --excludes-dir list
* test/lib/test/unit.rb (ExcludesOption): allow directory list by
  PATH_SEPARATOR to --excludes-dir option.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-10 12:24:19 +00:00
akr 04196d1f8c Use bit_length.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-10 11:40:20 +00:00
nobu 8ed8e0ba41 test_etc.rb: relax comparisons
* test/etc/test_etc.rb (test_getgrgid, test_getgrnam): relax
  comparisons.  getgrent() does not return mem properly in some
  circumstances (possibly, involved in Open Directory on OSX).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-10 07:15:12 +00:00
nobu 54f1d71ab2 test for [ruby-core:67473] [Bug #10727]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-10 04:02:08 +00:00
nobu d2da3d04e6 array.c: keep consistency
* array.c (rb_ary_select_bang): keep the array consistent by
  removing unselected values soon.  [ruby-dev:48805] [Bug #10722]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-10 01:12:17 +00:00
hsbt 07b87cd239 * lib/rubygems: Update to RubyGems HEAD(e53c54a).
* test/rubygems:  ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-09 14:20:10 +00:00
nobu 17a65c320d parse.y: eliminate empty hashes
* parse.y (assocs, assoc): eliminate splatting empty literal
  hashes.  [ruby-core:67446] [Bug #10719]
* compile.c (compile_array_): supprt splatted hash in hash type.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-09 02:13:03 +00:00
tenderlove 344b8bbd69 * ext/psych/lib/psych/visitors/yaml_tree.rb: correctly quote non-ascii
letters. Thanks @jirutka for the patch.

* test/psych/test_string.rb: test for change

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-08 22:25:31 +00:00
tenderlove 5dabead187 * ext/psych/lib/psych/visitors/to_ruby.rb: call `allocate` on hash
subclasses.  Fixes github.com/tenderlove/psych/issues/196

* test/psych/test_hash.rb: test for change

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-08 22:15:20 +00:00
tenderlove 8c08c8298a * ext/psych/lib/psych/visitors/to_ruby.rb: revive hashes with ivars
* ext/psych/lib/psych/visitors/yaml_tree.rb: dump hashes with ivars.
  Fixes github.com/psych/issues/43

* test/psych/test_hash.rb: test for change

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-08 22:00:54 +00:00
akr 45913acc68 Add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-08 15:38:13 +00:00
nobu 3f8ceab90e vm_method.c: no super klass, no original method entry
* vm_method.c (rb_method_entry): if no super class, no original
  method entry.  [ruby-core:67389] [Bug #10707]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-08 08:05:03 +00:00
nobu 459894160e vm_method.c: fix change refined new method visibility
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-08 07:31:45 +00:00
nobu 759a31b4a3 Revert GH-808
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-08 07:07:59 +00:00
usa a8565ad220 * test/ruby/test_symbol.rb (TestSymbol#test_symbol_fstr_leak): get rid of a
false positive on mswin CI.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-08 06:31:30 +00:00
usa 934253416e * test/test_open3.rb (TestOpen3#test_numeric_file_descriptors): passing FDs
bigger than 2 is not supported on Windows.
  fixed test failure introcuded at r49173.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-08 06:26:11 +00:00
akr 1ade9cad02 * lib/open3.rb: Open3 properly passes non-keyword hash args to spawn.
Fixed by Josh Cheek.  [Fix GH-808]
  Related to [ruby-core:67347] [Bug #10699]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-07 15:29:28 +00:00
headius cd3bf49898 * test/ruby/test_method.rb: Add test for &-coersion of an
UnboundMethod.
* test/ruby/test_module.rb: Add test for define_method given an
  UnboundMethod.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49164 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-06 20:56:49 +00:00
akr d50a8dd0bd Refine an assertion message.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-06 12:42:41 +00:00
akr 9bbe6b9d0c * time.c (timelocalw): Set tm_isdst field -1 if vtm->isdst is
VTM_ISDST_INITVAL.  This bug is introduced at packing struct
  vtm (r45155).
  [ruby-core:67345] [Bug #10698] Reported by Boris Ruf.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-06 12:41:20 +00:00
ko1 37360f82aa * test/fiddle/test_handle.rb: fix syntax.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-05 18:11:32 +00:00
nobu 64e2406427 test_handle.rb: use -test-/dln/empty
* test/fiddle/test_handle.rb (test_NEXT): use -test-/dln/empty
  which is always a shared object and is not used by others.
  [ruby-dev:48629] [Bug #10384]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-05 15:16:13 +00:00
nobu fb79364092 test_handle.rb: separate blocks
* test/fiddle/test_handle.rb (test_static_sym, test_NEXT):
  separate each rescue blocks.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-05 15:15:48 +00:00
nobu 3e8687a2ad test_handle.rb: remove skips
* test/fiddle/test_handle.rb (test_static_sym, test_DEFAULT):
  remove useless skips.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-05 15:15:41 +00:00
nobu c9b3950d30 ext/-test-/dln/empty: move from ext/-test-/win32/dln
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-05 15:14:54 +00:00
hsbt 471f5a7af0 * test/ruby/test_io.rb: added timeout for AIX environment.
[ruby-core:62983][Bug #9917]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-05 05:58:03 +00:00
nobu 10ce99866f ostruct.rb: append suffixes to protected methods
* lib/ostruct.rb (modifiable?, new_ostruct_member!, table!):
  append suffixes to protected methods so that they will not clash
  with assigned members.  [Fix GH-806]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-05 01:57:26 +00:00
nobu 1b7efc132a test/unit.rb: ExcludesOption
* test/lib/test/unit.rb (ExcludesOption): add "excludes" support
  to test suite, for alternative implementations and platforms.
  [Feature #10682]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-04 13:33:35 +00:00
nobu 54bfb33366 test/unit.rb: reorder Test::Unit
* test/lib/test/unit.rb (Test::Unit): reorder modules and merge
  each modules.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-04 13:32:44 +00:00
nobu 42bb2c712e test/unit.rb: split Test::Unit
* test/lib/test/unit.rb (Test::Unit): split the large class into
  each modules.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-04 13:32:11 +00:00
nobu 3977fd332f parse.y: fix f_label result
* parse.y (f_label): return tLABEL value as it is.
  [ruby-core:67315] [Bug #10693]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-04 12:32:54 +00:00
nobu b9c630f999 parallel.rb: expand path
* test/lib/test/unit/parallel.rb (run): expand the file name to be
  loaded, so that relative paths work in parallel mode.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-04 05:02:40 +00:00
ayumin dd2d43d9bd * test/test_tempfile.rb: use assert_file for more descriptive message.
following r49131.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-04 04:41:04 +00:00
nobu cf0006ea2b testcase.rb: call super
* test/lib/test/unit/testcase.rb (method_added): hook methods
  should call super.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-04 02:15:03 +00:00
nobu 49243b9944 unit.rb: no insult method
* test/lib/minitest/unit.rb (i_suck_and_my_tests_are_order_dependent!):
  remove.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-04 02:04:31 +00:00
nobu 8a57298c09 unit.rb: no UNDEFINED
* test/lib/minitest/unit.rb (UNDEFINED): remove.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-04 02:04:26 +00:00
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