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

48568 Коммитов

Автор SHA1 Сообщение Дата
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 6918546499 Ignored `bundle_ruby` example with Ruby core.
It was ignored with Bundler-1.15.x. It's regression at r60603.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-27 05:38:48 +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
ko1 33201294eb Ignore failures related to threading.
* test/lib/tracepointchecker.rb: ignore "deletion trace" check
  when there are threads other than the main thread.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-27 02:11:36 +00:00
ko1 9f1c00ce65 Relax `rb_bug()` condition.
* iseq.c (rb_iseq_trace_set): simply return immediately if
  ISeq::compile_data is available. Not sure why this state
  is allowed, but exception during compile (or `ISeq::load`)
  can make such states.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-27 00:43:23 +00:00
yui-knk 2734867c16 parse.y: Fix the last location of NODE_KW_ARG
* parse.y (kwd_append): Update the last location of
  NODE_KW_ARG when NODE is appended to the last.

  e.g. The locations of the first NODE_KW_ARG is fixed:

  ```
  def a(b: 1, c: 2); end
  ```

  * Before

  ```
  NODE_KW_ARG (line: 1, first_lineno: 1, first_column: 6, last_lineno: 1, last_column: 10)
  ```

  * After

  ```
  NODE_KW_ARG (line: 1, first_lineno: 1, first_column: 6, last_lineno: 1, last_column: 16)
  ```

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-26 23:52:47 +00:00
svn 11dc055b1b * 2017-11-27
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-26 23:33:24 +00:00
yui-knk 62b5c62f3d parse.y: Fix the last location of NODE_OPT_ARG
* parse.y (opt_arg_append): Update the last location of
  NODE_OPT_ARG when NODE is appended to the last.

  e.g. The locations of the first NODE_OPT_ARG is fixed:

  ```
  def a(b = 1, c = 2); end
  ```

  * Before

  ```
  NODE_OPT_ARG (line: 1, first_lineno: 1, first_column: 6, last_lineno: 1, last_column: 11)
  ```

  * After

  ```
  NODE_OPT_ARG (line: 1, first_lineno: 1, first_column: 6, last_lineno: 1, last_column: 18)
  ```

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-26 23:33:23 +00:00
rhe a996893397 openssl: sync with 2475d94517b4
Merge a commit from upstream:

	01445af367ec test/test_ssl: prevent changing default internal encoding

OpenSSL::TestSSL#test_fallback_scsv could change the default internal
encoding accidentally, causing other unrelated test cases to fail.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-26 10:33:32 +00:00
nobu 4f5357689b leakchecker.rb: no conversion
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-26 02:11:24 +00:00
svn 999e4db6f0 * 2017-11-26
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-26 01:36:34 +00:00
nobu cea5a91163 util.h: remove my_getcwd
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60908 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-26 01:36:33 +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
yui-knk c56ac08636 parse.y: opt_arg_append
* parse.y (opt_arg_append): extract optional arguments
  append.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-25 11:57:33 +00:00
svn bf2ddcf8c1 * 2017-11-25
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-25 01:39:46 +00:00
yui-knk ce64157d97 parse.y: Fix a location of assignable nodes
* parse.y (new_op_assign_gen): Update the location of
  lhs when NODE_OP_ASGN_OR/NODE_OP_ASGN_AND are generated.
  When NODE_OP_ASGN_OR/NODE_OP_ASGN_AND are generated
  a nd_value of lhs is set, so it is needed to update
  a location of lhs to include a location of rhs (same as
  node_assign_gen).

  e.g. The locations of NODE_DASGN_CURR is fixed:

  ```
  a ||= 1
  ```

  * Before

  ```
  NODE_DASGN_CURR (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 1)
  ```

  * After

  ```
  NODE_DASGN_CURR (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 7)
  ```

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-25 01:39:45 +00:00
yui-knk 6240f58353 node.h: Remove not used macros
* node.h (nd_modl, nd_clss_, nd_tval, nd_visi_): Remove
  not used macros.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-24 13:08:21 +00:00
k0kubun 7128849c8c test_workspace.rb: skip test failing on windows
> Note that all files are always readable
> https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/chmod-wchmod
It seems that we can't make a file unreadable with `File.chmod` on
Windows.

When file can't be read, File::EACCES is raised on Windows too. So
r60900 should work anyway, but I don't know how to let it happen by
Ruby code. I tried to open file before reading it, but I couldn't
reproduce File::EACCES too.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-24 12:37:07 +00:00
kazu 6d14c47c20 Fix TOCTTOU and avoid to read existing unreadable file
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-24 11:00:10 +00:00
kazu dff3d5dc69 Fix typos [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-24 11:00:08 +00:00
nobu 9560d2e0fb test/irb/test_workspace.rb: fix SCRIPT_LINES__
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-24 05:46:55 +00:00
nobu 9b48a6aec1 workspace.rb: one more space
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-24 05:44:58 +00:00
nobu 8b6e9aa792 workspace.rb: fix SCRIPT_LINES__
* lib/irb/workspace.rb (code_around_binding): `SCRIPT_LINES__`
  values are arrays of lines.  get file and line at once.  moved
  loop-invariant format string.  join without extra strings by
  `$,`.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-24 05:00:56 +00:00
normal 8fb87e43c6 file.c: simplify eaccess(3) callers
This will make future work to release GVL here simpler.

* file.c (rb_eaccess): new function
  (rb_file_readable_p): use rb_eaccess
  (rb_file_writable_p): ditto
  (rb_file_executable_p): ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-24 04:49:05 +00:00
k0kubun ea576241b0 NEWS: note about r57274
fixed r60888 to have Feature number too.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-24 04:29:49 +00:00
nobu f418f9b4ce parse.y: make_array
* parse.y (make_array): turn NULL node into zero length array.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-24 04:26:29 +00:00
nobu eb13bcec58 parse.y: refactor list literals
* parse.y (words, symbols, qwords, qsymbols): unify empty list and
  non-empty list.

* parse.y (parser_parse_string): always dispatch a word separator
  at the beginning of list literals.
  [ruby-core:83871] [Bug #14126]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-24 04:26:27 +00:00
nobu 9c86c513f0 test_parser_events.rb: results of list literals
* test/ripper/test_parser_events.rb (test_qwords_add),
  (test_qsymbols_add, test_symbols_add, test_words_add): more
  assertions for results of list literals.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-24 04:26:23 +00:00
svn 4046ca5796 * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-24 03:53:30 +00:00
svn 05d7ab61d0 * 2017-11-24
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-24 03:53:28 +00:00
k0kubun 106c9883e1 irb.rb: show source around binding.irb on start
[Feature #14124] [ruby-dev:50319] [close GH-1764]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-24 03:53:27 +00:00
yui-knk f8523d35bf parse.y: Fix a location of serial NODE_AND/NODE_OR
* parse.y (logop_gen): Update the last location of
  NODE_AND/NODE_OR when NODE is appended to the last.

  e.g. The locations of NODE_AND is fixed:

  ```
  a && b && c
  ```

  * Before

  ```
  NODE_AND (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 6)
  ```

  * After

  ```
  NODE_AND (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 11)
  ```

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-23 14:15:27 +00:00
k0kubun dd979f9d69 .travis.yml: revert "workaround to resolve ::1"
This commit reverts r60736.

Shibata-san reported the cause of r60736 to Travis and it seems fixed:
https://github.com/travis-ci/travis-ci/issues/8780

In another CI, I found "::1     ip6-localhost ip6-loopback" in build
system information, unlike "::1  localhost ip6-localhost ip6-loopback"
that had failed in Ruby's CI on Travis.

Let's try Container-based environment again.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-23 14:04:24 +00:00
yui-knk 4a73890189 thread.c: Update documents
* thread.c (rb_default_coverage): Update documents of internal
  data structures for branch coverage.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-23 11:52:36 +00:00
nobu 1046eae781 io.c: read BOM only for reading
* io.c (io_strip_bom): just abandon detecting UTF encoding by BOM
  unless opened for reading.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-23 07:10:56 +00:00
nobu dee6a91002 ripper.y: fix word list events
* parse.y (parser_skip_words_sep): QWORDS_BEG should not include
  the first separators in ripper.

* parse.y (parser_parse_string): WORDS_SEP should not include
  the closing parentheses of a word list in ripper, should include
  spaces at beginning of lines.  [ruby-core:83864] [Bug #14126]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-23 04:30:23 +00:00
nobu 717b7fd9c4 debug.c: include RIMemo in ruby_dummy_gdb_enums
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-23 03:14:12 +00:00
stomar 8692d74b09 lib/set.rb: [DOC] remove empty comments
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-22 21:13:51 +00:00
svn 57d2be7b7f * 2017-11-23
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-22 20:58:25 +00:00
stomar 62191f1cc5 set.rb: improve docs for Set
* lib/set.rb: [DOC] add examples for Set#replace,
  add examples for creating a set from a hash with duplicates,
  simplify and fix style of some other examples, fix typos.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-22 20:58:24 +00:00
svn 9a2ea1039e * 2017-11-22
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-22 12:32:42 +00:00
yui-knk b5ee316862 parse.y: Fix the locations of NODE_BLOCK_PASS
* parse.y (arg_blk_pass): Update the first location of
    NODE_BLOCK_PASS if nd_head is assigned.

  e.g. The locations of NODE_BLOCK_PASS is fixed:

  ```
  a(1, &:to_s)
  ```

  * Before

  ```
  NODE_BLOCK_PASS (line: 1, first_lineno: 1, first_column: 5, last_lineno: 1, last_column: 11)
  ```

  * After

  ```
  NODE_BLOCK_PASS (line: 1, first_lineno: 1, first_column: 2, last_lineno: 1, last_column: 11)
  ```

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-22 12:32:41 +00:00
kazu 31b6079e17 Fix a typo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-21 12:29:52 +00:00
kazu 246c986eac Use `const void*` instead of `const char*`
Use cast from `char*` to `void*` instead of union in opendir_without_gvl,
because convert from `void*` to `char*` without union in nogvl_opendir.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-21 12:29:51 +00:00
nobu cac048a16c vm_args.c: ec arg of args_setup_kw_parameters
* vm_args.c (args_setup_kw_parameters): use same ec as the caller.
  make arguments order consistent with other functions.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-21 11:15:51 +00:00
usa afa10bd125 Skip comment lines
* template/prelude.c.tmpl (translate): empty (only LF) lines are not necessary.
  so skip them, but for safety only when they are made from comment line.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-21 08:48:07 +00:00
nobu bca966617e fix test_erb.rb [GH-1763]
* test/erb/test_erb.rb (test_run): require stringio.  suppress an
  unused variable warning.

From: MSP-Greg <MSP-Greg@users.noreply.github.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-21 05:01:28 +00:00
ko1 eb3e32480d check invariant.
* iseq.c (rb_iseq_trace_set): at this point ISEQ_USE_COMPILE_DATA
  should not be set.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-21 02:57:01 +00:00
eregon 48bfcdb4a0 test/ruby/bug-13526.rb: should wait until all threads are stopped
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-21 00:56:09 +00:00