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

6791 Коммитов

Автор SHA1 Сообщение Дата
mame 9b1d8ab7d0 ext/coverage/coverage.c: remove COVERAGE_EXPERIMENTAL_MODE
A NEWS entry is also added.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12 00:20:58 +00:00
hsbt 848e6cfe7a Bump version to zlib-1.0.0 as default gems.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-11 08:37:49 +00:00
hsbt 5f2083921b Bump version to sdbm-1.0.0 as default gems.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-11 06:48:09 +00:00
hsbt 4000f70dc2 Bump version to fcntl-1.0.0 as default gems.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-11 06:03:53 +00:00
hsbt 6b669d880c Bump version to date-1.0.0 as default gems.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61110 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-11 03:56:01 +00:00
stomar 9a26a4c13a ext/strscan/strscan.c: [DOC] grammar fixes
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-08 22:42:19 +00:00
nobu a4804fbdf5 support gperf 3.1
* tool/gperf.sed: extracted sed commands to a script.  ANSI-C code
  produced by gperf 3.1 declares length arguments as `size_t`.  it
  causes conflict with existing declarations, and needs casts for
  a local variable and return statements.
  [Feature #13883]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-08 05:51:19 +00:00
hsbt 9ef078e2a7 Bump fiddle-1.0.0 for released version.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-06 08:35:13 +00:00
hsbt 836aaa0cdc Bump gdbm-2.0.0 for released versionn.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-06 08:34:34 +00:00
hsbt 2d031181af Bump dbm-1.0.0 for released version.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-06 08:32:01 +00:00
mame f6556c5c39 ext/coverage/coverage.c: method coverage has column info. of method def.
This change makes method coverage result have not only first lineno of
method defintion, but also code range (i.e. first lineno, first column,
last lineno, and last column).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-05 08:56:51 +00:00
mame a5e02f249d vm_core.h (rb_iseq_locatoin_t): add a field `code_range`
This change makes each ISeq keep NODE's code range.  This information is
needed for method coverage.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-05 08:56:50 +00:00
mame 0a6816ecd7 Revamp method coverage to support define_method
Traditionally, method coverage measurement was implemented by inserting
`trace2` instruction to the head of method iseq.  So, it just measured
methods defined by `def` keyword.

This commit drastically changes the measuring mechanism of method
coverage; at `RUBY_EVENT_CALL`, it keeps a hash from rb_method_entry_t*
to runs (i.e., it counts the runs per method entry), and at
`Coverage.result`, it creates the result hash by enumerating all
`rb_method_entry_t*` objects (by `ObjectSpace.each_object`).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-05 07:16:42 +00:00
nobu 340fe20a3b hide internal data objects
* marshal.c (compat_allocator_table): hide the wrapper object of
  compat_allocator_tbl.

* process.c (rb_execarg_new): hide wrapper objects of struct
  rb_execarg.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-04 07:37:21 +00:00
nobu 7101611b76 ifaddr.c: fix memsize
* ext/socket/ifaddr.c (ifaddr_memsize): do not count the whole
  rb_ifaddr_t array for each elements.  the header size is
  included in the first element for the time being.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-04 06:08:30 +00:00
nobu 7a936a6362 ifaddr.c: unused member
* ext/socket/ifaddr.c (struct rb_ifaddr_tag): removed set but
  unused member root.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-03 23:54:45 +00:00
shugo 436fd82ab7 Init functions should have prefix to avoid confliction.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-03 08:02:56 +00:00
naruse 499da5f2e7 static
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-02 15:41:08 +00:00
naruse d7b06e282a Update dependencies
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-02 15:41:07 +00:00
nobu a1692f7fdf string.c: fix rb_external_str_new_with_enc
* string.c (rb_external_str_new_with_enc): do not search non-ascii
  by NULL pointer.  [ruby-core:84055] [Bug #14150]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-02 07:09:16 +00:00
hsbt 44320c5b8d Merge psych-3.0.0.
See NEWS file for this update details.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-01 01:52:26 +00:00
nobu 256c88861b strscan.c: add MatchData-like methods
* ext/strscan/strscan.c: added `size`, `captures` and `values_at`
  to StringScanner, shorthands of accessing the matched data.
  based on the patch by apeiros (Stefan Rusterholz) at
  [ruby-core:20412].  [Feature #836]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-29 07:57:48 +00:00
nobu 2d9f20e1cf psych_parser.c: fix compile error
* ext/psych/psych_parser.c (parse): fix declarations after
  statement, which cause compile error on mswin.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-27 06:59:07 +00:00
hsbt b613a2c5ae Merge psych-3.0.0.beta4 from upstream.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-27 03:11:18 +00:00
rhe a55320b093 openssl: import v2.1.0.beta2
Import Ruby/OpenSSL 2.1.0.beta2. The full commit log since commit
e72d960db262 which was imported by r60013 can be found at:

	https://github.com/ruby/openssl/compare/e72d960db262...v2.1.0.beta2

----------------------------------------------------------------
Kazuki Yamaguchi (26):
      bn: use ALLOCV() macro instead of xmalloc()
      appveyor.yml: remove 'openssl version' line
      test/test_ssl_session: skip tests for session_remove_cb
      x509ext: implement X509::Extension#==
      x509attr: implement X509::Attribute#==
      x509cert: implement X509::Certificate#==
      x509revoked: add missing X509::Revoked#to_der
      x509crl, x509revoked: implement X509::{CRL,Revoked}#==
      x509req: implement X509::Request#==
      ssl: extract rb_intern("call")
      cipher: disallow setting AAD for non-AEAD ciphers
      test/test_cipher: fix test_non_aead_cipher_set_auth_data failure
      ssl: fix conflict of options in SSLContext#set_params
      buffering: let #write accept multiple arguments
      pkey: make pkey_check_public_key() non-static
      x509cert, x509crl, x509req, ns_spki: check sanity of public key
      test/envutil: port assert_warning from Ruby trunk
      test/utils: remove a pointless .public_key call in issue_cert
      ssl: add SSLContext#add_certificate
      test/test_ssl: fix test_security_level
      Drop support for LibreSSL 2.4
      kdf: add HKDF support
      test/test_x509cert: fix flaky test
      test/test_x509crl: fix random failure
      History.md: fix a typo
      Ruby/OpenSSL 2.1.0.beta2

Mark Wright (1):
      Fix build failure against OpenSSL 1.1 built with no-deprecated Thanks rhenium for the code review and fixes.

Peter Karman (1):
      Add RSA sign_pss() and verify_pss() methods

aeris (1):
      TLS Fallback Signaling Cipher Suite Value

kazu (1):
      Use caller with length to reduce unused strings

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-25 14:12:08 +00:00
rhe 55953e374d openssl: revert changes in SSLContext#{min,max}_version= in r60310
And adapt a net/http test to their old behavior.  [ruby-core:83491]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-25 14:12:07 +00:00
suke 3c0cf7856a * ext/win32ole/win32ole.c: use WIN32OLEQueryInterfaceError when failed
to query com interface.
* ext/win32ole/win32ole_event.c: ditto.
* ext/win32ole/win32ole_method.c: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-18 02:53:39 +00:00
yui-knk 7fbab01f77 Add a last location to branch coverage
* compile.c (DECL_BRANCH_BASE, ADD_TRACE_BRANCH_COVERAGE): Add
  a last location to arguments.

* compile.c (compile_if, compile_case, compile_case2, compile_loop, iseq_compile_each0):
  Pass a last location to macros.

* ext/coverage/coverage.c (branch_coverage): Add a last location to
  a return value.

* test/coverage/test_coverage.rb: Follow-up these changes.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-16 03:36:20 +00:00
suke 856aca46b7 * ext/win32ole/win32ole.c(ole_const_load): suppress constant redefinition
warnings when WIN32OLE.const_load [Bug #14085]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-11 03:57:02 +00:00
knu b0c719dae4 Fix typos in rdoc
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-08 03:57:54 +00:00
stomar c1e1e2b6d9 pathname.c: improve docs for Pathname
* ext/pathname/pathname.c: [DOC] improve example for Pathname.glob,
  by using a more common glob pattern, and improve the reference
  to the `base' keyword argument for Pathname#glob.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-07 20:14:46 +00:00
stomar b6db783eed socket.c,tcpsocket.c: improve deprecation notices
* ext/socket/socket.c: [DOC] fix grammar in deprecation notices.
* ext/socket/tcpsocket.c: [DOC] ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-07 20:13:00 +00:00
stomar bf6ea09c8f ext/socket/ifaddr.c: [DOC] fix typo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-07 20:09:19 +00:00
stomar 0f7fed9253 etc.c: improve docs for sysconfdir
* ext/etc/etc.c: [DOC] small language fixes for etc_sysconfdir docs.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-07 20:08:34 +00:00
knu f477851bb7 Add details on the min/time parameters to the rdoc
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-07 05:28:14 +00:00
nobu 3280f54168 lexer.rb: Ripper::Lexer::State
* ext/ripper/lib/ripper/lexer.rb (Ripper::Lexer::State): wrapper
  of lex_state values.

* parse.y (rb_parser_lex_state_name): return shared strings.  lex
  state combinations are very restricted.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60665 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-05 21:13:18 +00:00
suke 6bac2765a7 ext/win32ole/lib/win32ole.rb (metods): rescue WIN32OLEQueryInterfaceError.
test/win32ole/test_win32ole.rb: add test for WIN32OLE#methods


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-05 01:02:04 +00:00
suke 8930a4257d * ext/win32ole/win32ole_error.c: add WIN32OLEQueryInterfaceError.
* ext/win32ole/win32ole_error.h: ditto.
* ext/win32ole/win32ole.c(typeinfo_from_ole): raise WIN32OLEQueryInterfaceError in ole_methods.
* ext/win32ole/win32ole_method.c(ole_methods_from_typeinfo): ditto.

M    ext/win32ole/win32ole.c
M    ext/win32ole/win32ole_error.c
M    ext/win32ole/win32ole_error.h
M    ext/win32ole/win32ole_method.c


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-05 00:30:57 +00:00
mame b6e80c2260 Remove RNODE cast from NODE utility functions
Now, casting NODE to VALUE is not recommended.  This change requires an
explicit cast from VALUE to NODE to use the NODE utility functions such
as `nd_type`.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-04 11:37:19 +00:00
mame 1aa34afd41 Rename imemo_strterm to imemo_parser_strterm
Per ko1's request.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-04 10:56:50 +00:00
mame 739aadbb52 ext/objspace/objspace.c: add imemo_strterm
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-04 10:56:49 +00:00
kazu a5a8ba7d57 Fix a typo [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-03 07:14:51 +00:00
suke 93ae434772 * ext/win32ole/lib/win32ole.rb :add WIN32OLE#methods. WIN32OLE might work
well with did_you_mean gem.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-03 06:07:24 +00:00
nobu dfbeb7188d Pathname: get rid of a -Wcomment warning [DOC]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-01 03:26:27 +00:00
marcandre e63dd598a7 Pathname: Simplify example [DOC] [ci-skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-31 22:24:03 +00:00
hsbt 865decb508 null byte at Psych::Emitter.
Check null byte. Patched by tommy (Masahiro Tomita).
  [Bug #13993][ruby-dev:50285]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-31 07:24:29 +00:00
yui-knk a09e175068 Use NODE_CASE2 if case expressions don't exist
When NODE_WHEN is compiled by iseq_compile_each0,
the node passed to compile_when is NODE_WHEN (not NODE_CASE).
So we can not handle the location of NODE_CASE of
case statements which don't have case expressions.

e.g. :

```
case; when 1; foo; when 2; bar; else baz; end
```

This commit adds NODE_CASE2, and compiles it by
iseq_compile_each0.

* compile.c (compile_case): Does not call COMPILE_ when
  NODE_CASE does not have case expressions.
* compile.c (compile_case2): Compile NODE_CASE2 by compile_case2.
* compile.c (compile_when): Delete an obsoleted function.
* compile.c (iseq_compile_each0): Compile NODE_CASE2.

* ext/objspace/objspace.c (count_nodes): Add NODE_CASE2 case.

* node.c (dump_node, rb_gc_mark_node): Add NODE_CASE2 case.

* node.h (node_type): Add NODE_CASE2.
* node.h (NEW_CASE2): Add a macro which generates NODE_CASE2.

* parse.y: Generate NODE_CASE2 if case expressions don't exist.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-31 00:46:30 +00:00
normal ba5eb6458a socket: fix BasicSocket#*_nonblock buffering bugs from r58400
IO#read_nonblock and IO#write_nonblock take into account
buffered data, so the Linux-only BasicSocket#read_nonblock
and BasicSocket#write_nonblock methods must, too.

This bug was only introduced in r58400
("socket: avoid fcntl for read/write_nonblock on Linux")
and does not affect any stable release.

* ext/socket/basicsocket.c (rsock_init_basicsocket):
* ext/socket/init.c (rsock_s_recvfrom_nonblock):
* ext/socket/init.c (rsock_init_socket_init):
* ext/socket/lib/socket.rb (def read_nonblock):
* ext/socket/lib/socket.rb (def write_nonblock):
* ext/socket/rubysocket.h (static inline void rsock_maybe_wait_fd):
* test/socket/test_basicsocket.rb (def test_read_write_nonblock):
  [Feature #13362]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-27 23:26:48 +00:00
nobu 8fc8587e05 sysconfdir on Windows
* ext/etc/etc.c (etc_sysconfdir): mentioned special case on
  Windows.  [ruby-core:43110] [Bug #6121]

* ext/etc/extconf.rb: define SYSCONFDIR only if sysconfdir is set
  in RbConfig::CONFIG and not empty.

* win32/Makefile.sub (config.status): sysconfdir is not used on
  Windows.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-24 13:48:08 +00:00
naruse 1333c0f0df Revert "sysconfdir on Windows"
This reverts commit r60279.
This breaks mswin build:
https://ci.appveyor.com/project/ruby/ruby/build/1.0.5571

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-24 11:15:20 +00:00