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

44375 Коммитов

Автор SHA1 Сообщение Дата
kazu 151536d44d * doc/extension.ja.rdoc: translate r56130 (rb_check_arity). [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-17 01:51:22 +00:00
svn 5b0134aa99 * 2016-09-17
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-16 17:44:46 +00:00
tenderlove 45e8ccde00 Use JSON lines format for full heap dumps.
This commit changes full heap dumps back to using JSON lines format
(http://jsonlines.org) so that we can process very large heaps without
loading the entire heap in to memory at once.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-16 17:44:45 +00:00
ngoto 54fa33ea49 * ext/openssl/ossl_ssl.c (ssl_npn_select_cb_common): Fix compile error
with old version of fcc (Fujitsu C Compiler) on Solaris 10.
  [Bug #12769] [ruby-dev:49809]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-16 13:11:28 +00:00
ngoto 16391af2e2 * internal.h (MAYBE_UNUSED): The fallback definition is needed.
Fix compile error with some non-GCC compilers such as
  Oracle Solaris Studio 12.3 on Solaris 10.
  [Bug #12767] [ruby-dev:49807]

* internal.h (WARN_UNUSED_RESULT): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-16 12:29:42 +00:00
ngoto c1dbcf9b7e * hash.c (each_pair_i_fast): Fix compile error with old version of
fcc on Solaris 10. [Bug #12768] [ruby-dev:49808]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-16 12:20:35 +00:00
usa a334693422 * win32/Makefile.sub (config.h): fixed compile error with VC introduced
by previous commit.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-16 10:47:54 +00:00
shyouhei 2fc5210f31 * internal.h (WARN_UNUSED_RESULT): moved to configure.in, to
actually check its availability rather to check GCC's version.

	* configure.in (WARN_UNUSED_RESULT): moved to here.

	* configure.in (RUBY_FUNC_ATTRIBUTE): change function declaration
	  to return int rather than void, because it makes no sense for a
	  warn_unused_result attributed function to return void.

	  Funny thing however is that it also makes no sense for noreturn
	  attributed function to return int.  So there is a fundamental
	  conflict between them.  While I tested this, I confirmed both
	  GCC 6 and Clang 3.8 prefers int over void to correctly detect
	  necessary attributes under this setup.  Maybe subject to change
	  in future.

	* internal.h (UNINITIALIZED_VAR): renamed to MAYBE_UNUSED, then
	  moved to configure.in for the same reason we move
	  WARN_UNUSED_RESULT.

	* configure.in (MAYBE_UNUSED): moved to here.

	* internal.h (__has_attribute): deleted, because it has no use now.

	* string.c (rb_str_enumerate_lines): refactor macro rename.

	* string.c (rb_str_enumerate_bytes): ditto.

	* string.c (rb_str_enumerate_chars): ditto.

	* string.c (rb_str_enumerate_codepoints): ditto.

	* thread.c (do_select): ditto.

	* vm_backtrace.c (rb_debug_inspector_open): ditto.

	* vsnprintf.c (BSD_vfprintf): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-16 06:15:55 +00:00
shyouhei 921c477646 * ChangeLog (add-log-time-format): Not exactly sure when but
recently (25.x maybe), emacs changed its API to take optional
	  two arguments.  We have to follow that.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-16 06:15:00 +00:00
svn f98a2c8f87 * 2016-09-16
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-15 21:44:57 +00:00
tenderlove c2cbd5528c Don't include bad password in URI exception output
We shouldn't include the bad password in the URI exception output
message.  Just knowing that there is a bad password is enough
information.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-15 21:44:56 +00:00
kazu 7070c5bff3 * doc/extension.ja.rdoc: Fix file name. [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-15 12:41:07 +00:00
naruse b86fbf259f Add $(srcdir) for lib directory
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56164 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-14 16:03:28 +00:00
svn 55feab655f * 2016-09-15
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-14 16:00:57 +00:00
svn 6227b8ec3f * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-14 16:00:57 +00:00
naruse 2abf156304 * benchmark/: add vnmakarov's benchmarks around hash [ruby-core:75265]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-14 16:00:55 +00:00
sho-h 2bbd6f18cd * .document: [DOC] add rbconfig. [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-14 12:52:00 +00:00
svn 202bbda2bf * 2016-09-14
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-13 22:22:15 +00:00
naruse d51aea54d8 * hash.c (each_pair_i_fast): use rb_yield_values2 to avoid var args.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-13 22:22:14 +00:00
rhe 00fcd967d9 string.c: avoid signed integer overflow
The behavior on signed integer overflow is undefined. On platform with
sizeof(long)==4, it's fairly easy that 'len + termlen' overflows, where
len is the string length and termlen is the terminator length.

So, prevent the integer overflow by avoiding adding to a string length,
or casting to size_t before adding where the total size is passed to
{RE,}ALLOC*().

* string.c (STR_HEAP_SIZE, RESIZE_CAPA_TERM, str_new0, rb_str_buf_new,
  str_shared_replace, rb_str_init, str_make_independent_expand,
  rb_str_resize): Avoid overflow by casting the length to size_t. size_t
  should be able to represent LONG_MAX+termlen.

* string.c (rb_str_modify_expand): Check that the new length is in the
  range of long before resizing. Also refactor to use RESIZE_CAPA_TERM
  macro.

* string.c (str_buf_cat): Fix so that it does not create a negative
  length String. Also fix the condition for 'string sizes too big', the
  total length can be up to LONG_MAX.

* string.c (rb_str_plus): Check the resulting String length does not
  exceed LONG_MAX.

* string.c (rb_str_dump): Fix integer overflow. The dump result will be
  longer then the original String.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-13 12:33:16 +00:00
rhe 2f551849c4 Use PRIuSIZE format specifier for size_t values
Use PRIuSIZE instead of PRIdSIZE. This fixes the exception message shown
on too large xmalloc2. This commit also fixes other incorrect use of
PRIdSIZE in other functions; though most of them are debug print.

* gc.c (heap_extend_pages, get_envparam_size, ruby_malloc_size_overflow,
  gc_profile_dump_on): Use PRIuSIZE instead of PRIdSIZE as the passed
  value is size_t, not ssize_t.

* iseq.c (get_line_info, rb_iseq_disasm_insn): Ditto.

* sprintf.c (rb_str_format): Ditto.

* thread_win32.c (native_thread_create): Ditto.

* vm.c (get_param): Ditto.

* ext/objspace/objspace_dump.c (dump_append_string_content,
  dump_object): Ditto.

* ext/socket/raddrinfo.c (host_str, port_str): Ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-13 12:33:13 +00:00
rhe eaba77154f string.c: rename STR_EMBEDABLE_P to STR_EMBEDDABLE_P
* string.c (STR_EMBEDDABLE_P): Renamed from STR_EMBEDABLE_P(). And use
  it in more places.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-13 12:28:54 +00:00
kazu df1c68b2af README{,.ja}.md: Drop support for BeOS now that Haiku is stable since 2.3.0. [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-13 12:26:04 +00:00
kazu 21edae75ef fix a typo [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-13 12:26:03 +00:00
kazu 24afa3987c fix unbalanced backquote [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-13 12:26:01 +00:00
nobu 2608f7d9c5 string.c: STR_EMBEDABLE_P
* string.c (STR_EMBEDABLE_P): extract the predicate macro to tell
  if the given length is capable in an embedded string, and fix
  possible integer overflow.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-13 12:11:57 +00:00
ko1 d4faa1013e * test/ruby/test_exception.rb: fix thread issues.
* use Queue instead of a local variable for synchronization.
  * join created thread to soleve leaking threads warning.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-13 09:39:08 +00:00
nobu 8a64787632 string.c: fix integer overflow
* string.c (rb_str_change_terminator_length): fix integer overflow
  in the case growing the terminator length and the string length
  is around LONG_MAX.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-13 08:12:54 +00:00
rhe be3baa4380 string.c: fix buffer overflow check condition in rb_str_set_len()
* string.c (rb_str_set_len): The buffer overflow check is wrong. The
  space for termlen is allocated outside the capacity returned by
  rb_str_capacity(). This fixes r41920 ("string.c: multi-byte
  terminator", 2013-07-11).  [ruby-core:77257] [Bug #12757]

* test/-ext-/string/test_set_len.rb (test_capacity_equals_to_new_size):
  Test for this change. Applying only the test will trigger [BUG].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-13 07:08:15 +00:00
rhe b4d0e5a4fb openssl: workaround for Ubuntu's patched OpenSSL
* test/openssl/test_ssl.rb (test_ctx_options): Add a workaround for
  patched OpenSSL to fix the Ruby CI failure on Ubuntu 16.04.
  http://rubyci.s3.amazonaws.com/ubuntu/ruby-trunk/log/20160913T033003Z.fail.html.gz
  This commit is a cherry-pick of the following commit at ruby/openssl:
  f9c04779a8

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-13 05:59:53 +00:00
naruse a2879ac27b * common.mk (benchmark): fix lib path.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-12 21:04:25 +00:00
svn 332723a20e * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-12 15:40:10 +00:00
tenderlove c4c53310c2 Copy the serial number from the super class to the singleton class
This helps hit inline method caches more frequently.  Before this
commit:

```
[aaron@TC ruby (trunk)]$ time ./ruby -v benchmark/bm_vm2_poly_singleton.rb
ruby 2.4.0dev (2016-09-12 trunk 56141) [x86_64-darwin15]

real  0m3.679s
user  0m3.632s
sys 0m0.022s
```

After this commit:

```
[aaron@TC ruby (trunk)]$ time ./ruby -v benchmark/bm_vm2_poly_singleton.rb
ruby 2.4.0dev (2016-09-12 trunk 56141) [x86_64-darwin15]
last_commit=Copy the serial number from the super class to the singleton class

real  0m2.246s
user  0m2.203s
sys 0m0.020s
```

[Feature #12364]
[ruby-core:75425]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-12 15:40:09 +00:00
svn fd8fa1b299 * 2016-09-13
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-12 15:16:10 +00:00
usa 774442d27f * time.c (time_arg): guard for mswin64 CI.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-12 15:16:09 +00:00
hsbt 94bbe4f0eb Added missing references of github and redmine.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-12 04:48:05 +00:00
svn 5ffc89f694 * 2016-09-12
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-12 04:46:28 +00:00
hsbt 52f9d387e6 * lib/uri/mailto.rb: Removed needless `return` and use `.`` instead of `::`
with class method.
* test/uri/test_mailto.rb: Added tests for coverage.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-12 04:46:27 +00:00
kazu a3af2d1edb NEWS: News about Module.used_modules.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-11 12:33:46 +00:00
kazu 8cce00e0b1 fix a typo [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-11 12:32:27 +00:00
kazu c616a9fa83 Update URL of Japanese document of net/pop
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-11 10:34:56 +00:00
kazu 07efce075b Use https instead of http in some URLs
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-11 10:33:36 +00:00
usa 960468683f * ChangeLog: added refs. [Bug #12748] [ruby-dev:49786]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-11 10:17:43 +00:00
svn 73bbccf4de * 2016-09-11
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-11 10:08:02 +00:00
usa ee0a79b37f * win32/win32.c (rb_w32_write_console): should set writen length as the
return value.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-11 10:08:01 +00:00
svn d432af3df7 * 2016-09-10
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-10 08:16:51 +00:00
nobu c5d707dc65 extension.rdoc: rb_check_arity [ci skip]
* doc/extension.rdoc (rb_check_arity): described.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-10 08:16:50 +00:00
kazu d0c717e410 * gems/bundled_gems: sort lines.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-09 13:44:15 +00:00
nobu 7f6410f02d json_generator_test.rb: no Bignum
* test/json/json_generator_test.rb (test_broken_bignum): get rid
  of use of Bignum, obsolete name.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-09 09:27:38 +00:00
nobu 646c53895f thread.c: set cause by Thread#raise
* thread.c (rb_threadptr_raise): set cause from the called thread,
  but not from the thread to be interrupted.
  [ruby-core:77222] [Bug #12741]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-09 08:59:48 +00:00