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

49099 Коммитов

Автор SHA1 Сообщение Дата
eregon 82d63fcaac Simplify Thread#[]= spec
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-21 09:29:18 +00:00
hsbt 4525cf2cd5 Merge release version of bundler-1.16.1 from upstream.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-21 09:22:15 +00:00
ko1 85277d5be0 revert r61371 for [Bug #14214]
Reverted patch doesn't check overwritten value.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-21 08:29:56 +00:00
nobu 168c019998 string.c: fix memory leak
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-21 07:59:00 +00:00
nobu c364252926 common.mk: revert r58542 [Bug #14213]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-21 07:50:46 +00:00
yui-knk 69ae0f0f42 iseq.c (rb_iseq_code_range): Remove needless `;`
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-21 07:09:03 +00:00
mame c2f10299ac parse.y: change NODE_SCOPE's nd_loc to one of the parent NODE
This change (ad-hocly) adjusts the code range of NODE_SCOPE in
class/module definition because the same adjust is already done in
method definition.  I intend to just remove inconsistency between
class/module definition and method definition, but this kind of adjust
is dirty, so it should be fixed later (maybe in 2.6).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-21 06:52:15 +00:00
ko1 e9a184ed63 add experimental API.
* iseq.c (rb_iseq_code_range): added to access iseq's code range.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-21 06:40:28 +00:00
naruse 05d1d29d1f Don't allow mixed escape
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-21 05:09:17 +00:00
naruse 188d85934b move dump format validation into parsing epilogue
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-21 05:09:16 +00:00
naruse 29c6ca423c fix escapes in undump
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-21 05:08:57 +00:00
sonots 7176eb2df9 * lib/logger.rb (Logger::LogDevice#open_logfile, #create_logfile):
Logger should be able to open only files [Bug #14212]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-21 05:07:43 +00:00
tenderlove 2c075d3863 Fix `imemo_name` to dump new imemo types
New IMEMO types were introduced, this just fixes the function that
converts the type to support the new types.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-21 00:40:54 +00:00
normal 3b174fb7d6 io.c: IO#pwrite uses tmp buffer to avoid parallel modification
Since we release GVL, we must freeze and duplicate the string buffer
to prevent other threads from modifying our buffer while we are
waiting on pwrite(2).

* io.c (rb_io_pwrite): use_rb_str_tmp_frozen_{acquire/release}
  [Bug #14195]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-21 00:26:24 +00:00
ko1 b895c402a5 fix threading bug.
* spec/ruby/core/thread/element_set_spec.rb: `t` can be uninitialized.
  Use `Thread.current` explicitly.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-20 23:49:30 +00:00
usa 098c8d5491 fix test errors on Windows
* test/resolv/test_addr.rb (test_hosts_by_command): on Windows, `|` is
	  invalid charactor for path and raises `Errno::EINVAL` if trying to
	  open.

	* test/resolv/test_dns.rb (test_resolv_conf_by_command): ditto.

	cf. [Bug #14205]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-20 16:04:41 +00:00
svn ac6db01fea * 2017-12-21
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-20 15:45:02 +00:00
nobu a94ede7a5a compile.c: branch on block param
* compile.c (compile_branch_condition): replace block param value
  in branch conditions with `defined(yield)`, to get rid of
  creating proc value.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-20 15:45:01 +00:00
nobu e105ee2bed iseq.c: block param name
* iseq.c (rb_insn_operand_intern): show local variable name at
  getblockparam/setblockparam too.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-20 14:10:06 +00:00
naruse 0078e40115 raise error if value contains CR/LF in iniheader of initialize_http_header
like r59693, initialize_http_header also should raise error. [Bug #14208]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-20 12:06:59 +00:00
stomar 677c539d1f NEWS: update news for Psych
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-20 09:51:29 +00:00
stomar d51151cf30 NEWS: "absent operator" is now called "absence operator"
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-20 09:31:58 +00:00
stomar efe8be7332 NEWS: grammar fixes
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-20 09:31:22 +00:00
hsbt 71e5c12578 Update rdoc-6.0.0 entry on NEWS file
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-20 08:50:26 +00:00
mame be3439026a iseq.c (get_insn_info): use binary search instead of linear search
This change introduces get_insn_info_binary_search, which is (should be)
equivalent to the old get_insn_info.
The old get_insn_info is renamed to get_insn_info_linear_search.  When
VM_CHECK_MODE > 0, the equivalence is validated at finish_iseq_build.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-20 07:38:24 +00:00
mame 799db969e9 test/coverage/test_coverage.rb: make the expected value the same as 2.4
A follow up of r61350

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-20 04:45:05 +00:00
nobu cdf1b85ae7 Fixed command Injection
* lib/resolv.rb (Resolv::Config.parse_resolv_conf): fixed
  potential command injection by use of Kernel#open.
  [ruby-core:84347] [Bug #14205]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-20 04:25:01 +00:00
mame c08e8886ba compile.c: add a RUBY_EVENT_COVERAGE_LINE event for line coverage
2.5's line coverage measurement was about two times slower than 2.4
because of two reasons; (1) vm_trace uses rb_iseq_event_flags (which
takes O(n) currently where n is the length of iseq) to get an event
type, and (2) RUBY_EVENT_LINE uses setjmp to call an event hook.

This change adds a special event for line coverage,
RUBY_EVENT_COVERAGE_LINE, and adds `tracecoverage` instructions where
the event occurs in iseq.
`tracecoverage` instruction calls an event hook without vm_trace.
And, RUBY_EVENT_COVERAGE_LINE is an internal event which does not
use setjmp.

This change also cancells lineno change due to the deletion of trace
instructions [Feature #14104].  So fixes [Bug #14191].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61350 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-20 04:24:14 +00:00
nobu e7464561b5 Fixed command Injection
* resolv.rb (Resolv::Hosts#lazy_initialize): fixed potential
  command Injection in Hosts::new() by use of Kernel#open.
  [Fix GH-1777] [ruby-core:84347] [Bug #14205]

From: Drigg3r <drigg3r@yandex.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-20 04:18:31 +00:00
mame 6df552eaee vm_insnhelper.c (vm_trace): fix a typo
Typical code clone bug.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-20 01:51:50 +00:00
ko1 cc2f982852 extend timeout limit.
* test/ruby/test_process.rb (test_threading_works_after_exec_fail):
  extend timeout limit from 30 to 90 because some test nodes fails
  with timeout error.

  Also use a Queue instead of a local variable to communicate with
  threads.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-20 00:24:19 +00:00
nobu 032e8fdf40 parse.y: end of script at newline
* parse.y (parser_yylex): deal with end of script chars just after
  ignored newline as other places.  [ruby-core:84349] [Bug #14206]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-20 00:09:51 +00:00
ngoto b37fc5aa7e skip test_aspawn_too_long_path on Solaris 10 or earlier
* test/ruby/test_process.rb (TestProcess#test_aspawn_too_long_path):
  skip test_aspawn_too_long_path on Solaris 10 or earlier versions
  because they lack Process::RLIMIT_NPROC and the test creates
  extraordinary number of processes that makes the system unstable.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-19 17:09:13 +00:00
ngoto 504842d81f Workaround for optimization bug of Oracle Developer Studio 12.4-12.6
* pack.c (pack_unpack, AVOID_CC_BUG): Very ugly workaround for
  optimization bug of Oracle Developer Studio (Oracle Solaris Studio)
  12.4, 12.5, and 12.6 on Solaris 10 with -xO4 optimization option.
  [Bug #11684] [ruby-core:84351]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-19 16:55:08 +00:00
svn 8c34a8a127 * 2017-12-20
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61343 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-19 15:40:14 +00:00
eregon 06c7693c1f Break out of the loop after shutdown in DRbServer
* Patch by @seki:
  https://gist.github.com/seki/ae8bef20238c37c94a91b5461c4bfbdd

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-19 15:40:13 +00:00
watson1978 2e6235aa71 Revert "Improve performance of creating Hash object"
This reverts commit r61309
Because it was unstable on mswin CI.

[ruby-dev:50370][Bug #14203]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61341 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-19 14:26:30 +00:00
hsbt 26529d3df9 Update version number of Psych
From: SHIBATA Hiroshi <hsbt@ruby-lang.org>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61340 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-19 12:28:18 +00:00
hsbt 0c530ddd13 Update RubyGems entry on NEWS file.
From: SHIBATA Hiroshi <hsbt@ruby-lang.org>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-19 12:23:21 +00:00
nobu d20f4eb169 st.c: fix up
* st.c (_st_table_list, _st_table_pool): symbols beginning with an
  underscore and a lower letter are preserved by the standard.

* st.c (get_st_table): protoized.

* st.c (st_insert_generic): adjust local variable type to an
  argument argc.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61338 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-19 12:20:21 +00:00
nobu 602fda25ab thread_sync.c: fix rdoc
* thread_sync.c (define_thread_class): hide rb_define_class_under
  from rdoc, so that fake code to teach rdoc takes effect.

* thread_sync.c (Init_thread_sync): teach rdoc Mutex.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-19 10:46:51 +00:00
hsbt def7fab871 Merge psych-3.0.2 from ruby/psych.
It version changed fallback option to keywoad argument
  on `Yaml.load` method. It break backword compatiblity.

  see detailed discuttion: https://github.com/ruby/psych/issues/340

From: SHIBATA Hiroshi <hsbt@ruby-lang.org>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-19 09:44:33 +00:00
nobu 373babeaac error.c: KeyError docs [ci skip]
* error.c (key_err_receiver, key_err_key): [DOC] documents of
  KeyError methods.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-19 04:57:20 +00:00
nobu 92bfddff92 vcs: --add-author-from
* tool/vcs.rb (VCS::GIT#commit): no --add-author-from option if
  author equals committer.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61334 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-19 03:17:37 +00:00
hsbt 5590ec8a8e Update version of strscan to 1.0.0.
But we couldn't ship strscan (and stringio) gem. Because rubygems.org
  still masked them.

  https://github.com/rubygems/rubygems.org/pull/1696

  I'm going to ship them after it deployed.

From: SHIBATA Hiroshi <hsbt@ruby-lang.org>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-19 03:12:22 +00:00
hsbt f39021be7e Remove digest.gemspec for default gems.
It needs to support header file installation and uninstallation.
  But current RubyGems didn't support it feature yet.

From: SHIBATA Hiroshi <hsbt@ruby-lang.org>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-19 02:43:09 +00:00
nobu 23beb59456 compile.c: pop splat result
* compile.c (compile_array): pop splat result without creating a
  new hash if the whole hash is popped.
  [ruby-core:84340] [Bug #14201]

From: Nobuyoshi Nakada <nobu@ruby-lang.org>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-19 02:41:37 +00:00
nobu 0d09ee1e73 Improve Array#- efficiency [Fixes GH-1756]
When doing the difference of a small array with a big one it is not
efficient in both time and memory to convert the second one to a hash.

From: Ana María Martínez Gómez <ammartinez@suse.de>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-19 01:08:52 +00:00
nobu 5c3f9641c0 compile.c: side effect in splat
* compile.c (compile_array): splat which may have side effects
  should be compiled even if the result will be popped.
  [ruby-core:84340] [Bug #14201]

From: Nobuyoshi Nakada <nobu@ruby-lang.org>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-19 00:45:55 +00:00
eregon 494b3aeaea Use syswrite to avoid potential buffering in IO#select spec
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-18 16:41:48 +00:00