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

45062 Коммитов

Автор SHA1 Сообщение Дата
hsbt 0a5abaf745 Fixed error with `make install`
rbinstall.rb couldn't load "psych/versions".

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-30 14:24:12 +00:00
hsbt 48e251df47 Update psych-2.2.1
It fixed segmentation fault related with GC.
  https://github.com/ruby/psych/pull/296

  and removed deprecated code of Ruby 1.8.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-30 13:55:02 +00:00
nobu 5e4b845522 parse.y: parser_tokadd_codepoint
* parse.y (parser_tokadd_codepoint): extract from
  parser_tokadd_utf8.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-30 13:09:51 +00:00
nobu 94715bc666 parse.y: brace constants
* parse.y (parser_tokadd_utf8): make open/close braces constant.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-30 13:09:50 +00:00
duerst 87b937bdfd fix uppercasing for U+A64B, CYRILLIC SMALL LETTER MONOGRAPH UK
* enc/unicode.c: Add U+A64B to the special cases 03B9 and 03BC
  at the end of onigenc_unicode_case_map (Bug #12990).

* enc/unicode/case-folding.rb: Add U+A64B to the special cases
  03B9 and 03BC. Add a comment pointing to enc/unicode.c.
  Change warnings to exceptions for unpredicted cases,
  because this would have been more easily noticed
  (the warning was not noticed when upgrading to Unicode 9.0.0).

* test/ruby/enc/test_case_comprehensive.rb: Remove temporary
  exclusion of U+A64B from testing.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56941 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-30 08:25:46 +00:00
nobu 22c0994bc8 parse.y: no warning for lambda
* parse.y (parser_yylex): do not warn parentheses of lambda
  argument list, because there is no name.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-30 01:40:11 +00:00
shugo f7d130f473 Supress warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-30 01:22:05 +00:00
tenderlove e04167bc32 Stop reading past the end of `ivptr` array
If you have code like this:

```ruby
class A
  def initialize
    @a = nil
    @b = nil
    @c = nil
    @d = nil
    @e = nil
  end
end

x = A.new
y = x.clone
100.times { |z| x.instance_variable_set(:"@foo#{z}", nil) }
puts y.inspect
```

`x` and `y` will share `iv_index_tbl` hashes.  However, the size of the
hash will grow larger than the number if entries in `ivptr` in `y`.
Before this commit, `rb_ivar_count` would use the size of the hash to
determine how far to read in to the array, but this means that it could
read past the end of the array and cause the program to segv

[ruby-core:78403]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-29 17:06:35 +00:00
nobu 716610ae56 get rid of ambiguous parentheses warnings
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-29 16:06:54 +00:00
rhe db31f2fafb webrick: don't use OpenSSL::TestUtils from webrick tests
Follow net/http and open-uri. Don't rely on the constants/methods from
OpenSSL::TestUtils.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-29 15:48:47 +00:00
rhe 0cc0080a49 open-uri: don't use OpenSSL::TestUtils from open-uri tests
Follow net/http. Define own test DH parameters and use.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56935 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-29 15:48:46 +00:00
rhe df769d9dc9 net/http: don't use OpenSSL::TestUtils from test code
Make test code independent of test/openssl/utils.rb. The development of
openssl library has moved to a separate repository and
OpenSSL::TestUtils may be modified at any time.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-29 15:48:45 +00:00
nobu 7f30d00b53 object.c: no TypeError at special const
* object.c (special_object_p): no longer raise a TypeError for
  Integer and Float, and return itself instead.  [Feature#12979]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-29 15:34:31 +00:00
kazu 7a480ae850 NEWS: Add String/Symbol#casecmp? [Feature #12786]
[ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-29 15:31:16 +00:00
usa 40c9f1f328 get rid of test failures on CI introduced at r56927
* lib/matrix.rb: now ruby warns ambiguous parentheses after a space in method definitions.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-29 15:23:12 +00:00
svn 18658d7d2c * 2016-11-30
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-29 15:14:06 +00:00
nobu fe3b21bb8c object.c: no TypeError at special const clone
* object.c (rb_obj_clone2): no longer raise a TypeError for
  special constants, and return itself instead.  however, if
  freeze option is false, raise an ArgumentError.  [Feature#12979]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-29 15:14:05 +00:00
nobu 9e3afec027 thread.c: fix doc of abort_on_exception [ci skip]
* thread.c (rb_thread_s_abort_exc, rb_thread_s_abort_exc_set):
  [DOC] the raised exception will be re-raised in the main thread,
  and then follows the ordinary exception sequence, exit status is
  not 0.  [ruby-core:78415] [Bug #12991]

* thread.c (rb_thread_abort_exc_set): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-29 12:54:43 +00:00
nobu 65e27c8b13 parse.y: ambiguous parentheses
* parse.y (parser_yylex): warn ambiguous parentheses after a space
  in method definitions.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-29 10:47:43 +00:00
duerst dacf977a42 Fix/improve documentation of String/Symbol#casecmp[?]
Fix documentation of String#casecmp? (examples didn't have the '?').
Add an example with non-ASCII characters. Clarify that casecmp,
unlike casecmp?, only does case-insensitivity on A-Z/a-z.
[ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-29 10:45:54 +00:00
shugo fa7066f818 Suppress warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-29 08:44:21 +00:00
duerst ddfa6e2b53 Fix erroneous test of target against target
* test/ruby/enc/test_case_comprehensive.rb: fix test condition,
  add a temporary check for U+A64B, the only character where the tests
  currently fail. (Bug #12990)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-29 08:39:57 +00:00
shugo c6f58ef198 Ignore SystemCallError in case it is raised by SSLSocket#accept.
Errno::ECONNRESET was raised by test_tls_post_connection_check and
test_tls_unknown_ca on mswin64 CI.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-29 08:31:39 +00:00
nobu 98763860a7 test_keyword.rb: more assertions
* test/ruby/test_keyword.rb (test_block_required_keyword): more
  assertions for positional and require keyword parameters.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-29 03:06:03 +00:00
nobu a65982f00f test_keyword.rb: assert_raise_with_message value
* test/ruby/test_keyword.rb (test_block_required_keyword):
  assert_raise_with_message returns the raised exception object.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-29 03:06:02 +00:00
nobu 07fb750fd0 string.c: use xmalloc
* string.c (rb_str_casemap): use xmalloc simply instead of
  ALLOC_N.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-29 03:06:01 +00:00
shugo 7242e6a9b6 net/ftp: add a new option ssl_handshake_timeout to Net::FTP.new.
The TLS handshake timeout can be specified independently, because the TLS
handshake doesn't start just after the underlying connection is established,
but after the AUTH command is completed.  It's also useful for testing
purposes.  However, if ssl_handshake_timeout is not specified, open_timeout
is used instead for convenience.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-29 02:47:11 +00:00
shugo a4072112b2 net/ftp: close the socket directly when an error occurs during TLS handshake.
Otherwise, @sock.read in Net::FTP#close hungs until read_timeout exceeded.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-29 02:33:34 +00:00
svn d8a0f14b58 * 2016-11-29
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-29 02:21:51 +00:00
shugo 2660dd5b16 net/ftp: close the connection if the TLS handshake timeout is exceeded.
Otherwise, file descriptor leaks may occur in Net::FTP.new.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-29 02:21:50 +00:00
nobu 78b0d7ac1c string.c: fix zero-length array
* string.c (mapping_buffer): get rid of zero-length array member,
  which is not a part of C90.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-28 13:16:00 +00:00
usa f2a1f32f48 hide exceptions in server thread
* test/net/ftp/test_ftp.rb (test_tls_connect_timeout): sleeping to give a chance of complete of accept is a timing issue at all.  therefore, simply ignore the exception.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-28 10:17:03 +00:00
nobu 196e8b4480 string.c: enable rdoc
* string.c (rb_str_casecmp_p): [DOC] move forward declaration of
  rb_str_downcase to enable rdoc.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-28 09:37:19 +00:00
duerst ad619e02c4 implement String/Symbol#casecmp? including Unicode case folding
* string.c: Implement String#casecmp? and Symbol#casecmp? by using
  String#downcase :fold for Unicode case folding. This does not include
  options such as :turkic, because these currently cannot be combined
  with the :fold option. This implements feature #12786.

* test/ruby/test_string.rb/test_symbol.rb: Tests for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-28 08:37:32 +00:00
nobu bd2fd73196 insns.def: adjust index type
* insns.def (checkmatch): adjust type of the index variable, to
  get rid of (potential) overflow.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-28 03:48:34 +00:00
usa 8e7e71d63e Give a chance to complete server.accept
* test/net/ftp/test_ftp.rb (test_tls_connect_timeout): get rid of a test error on Windows.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-28 03:14:07 +00:00
svn a530b970f4 * 2016-11-28
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-28 02:02:41 +00:00
nobu d6fdd1c330 compile.c: splatarray peephole opt
* compile.c (iseq_peephole_optimize): remove splatarray following
  always-array insn.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56908 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-28 02:02:40 +00:00
nobu 8cbb7747cd signal.c: improve stack overflow check
* signal.c (check_stack_overflow): [EXPERIMENTAL] consider the
  segfault a stack overflow when the fault address is between SP
  and BP.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-27 11:22:42 +00:00
nobu 70d8e6cf22 object.c: no TypeError at special const dup
* object.c (rb_obj_dup): no longer raise a TypeError for special
  constants, and return itself instead.  [Feature#12979]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-27 11:07:27 +00:00
knu 673a6ad970 Reverse compatibility_version and current_version for Darwin
The `compatibility_version` should have an API version and the
`current_version` should have a program version of Ruby, but they have
been reversed and the binary compatibility has never worked.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-27 10:08:00 +00:00
svn c46946ca12 * 2016-11-27
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-27 09:40:52 +00:00
ktsj edaf46da47 gems/bundled_gems: Update to power_assert 0.4.1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-27 09:40:51 +00:00
nobu 6b88dd2698 file.c: home directory from system
* file.c (rb_default_home_dir): resolve home directory from the
  system database when HOME is not set.  [Feature #12695]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-26 11:37:01 +00:00
nobu 58742627af win32.c: special folders as home dir
* win32/win32.c (rb_w32_home_dir): move from win32/file.c to try
  special folders.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-26 11:37:01 +00:00
nobu 8c08d2de53 NEWS: mention [Feature #12953] [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-26 10:57:02 +00:00
svn 2e2fa3ddcf * 2016-11-26
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-26 09:29:12 +00:00
shugo 473d0d3211 net/ftp: support timeout for TLS handshake.
Net::FTP inherits ssl_socket_connect from Net::Protocol to implement timeout.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-26 09:29:11 +00:00
nobu 631dde2572 round-down
* numeric.c (round_half_down, int_round_half_down): support
  round-down mode.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-25 06:28:00 +00:00
svn b6d10b6c37 * 2016-11-25
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-24 20:51:46 +00:00