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

49314 Коммитов

Автор SHA1 Сообщение Дата
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
ngoto b75828fdfa Support C89 if possible
* addr2line.c: Because stdbool.h is a C99 feature, compile error
  occurs with some old compilers without specifying C99 options.
  Fix compile error with Oracle Solaris Studio 12.4 on Solaris 10.
  [Bug #14200] [ruby-dev:50366]

* missing/stdbool.h: Alternative of stdbool.h for C89 compilers.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-18 16:17:17 +00:00
svn 5a2a95773b * 2017-12-19
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-18 15:46:57 +00:00
ngoto d088cb2727 eval_error.c: Fix compile error on Solaris 10
* eval_error.c (write_warn, write_warn2, write_warn_str): Fix compile
  error "operands have incompatible types" with Oracle Solaris Studio
  12.4 on Solaris 10.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-18 15:46:56 +00:00
naruse 027b576b31 suppress warning: 'const' attribute on function returning 'void'
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-18 09:03:59 +00:00
normal 74ceabb3b2 webrick 1.4.1 release
* lib/webrick/version.rb: bump version
* lib/webrick/webrick.gemspec: support Ruby 2.3+
  [Bug #14189]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-18 08:54:30 +00:00
nobu 7d42b6fa0a test_io.rb: EINVAL on Windows
* test/ruby/test_io.rb (test_read_command): unusable character
  causes Errno::EINVAL on Windows.

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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-18 07:39:05 +00:00
nobu d2f685eed7 io.c: opening external command
* io.c (rb_io_open_generic): try to open the named file as usual,
  if klass is not IO nor File, so that Errno::ENOENT will be
  raised probably.  calling on File will be same in the future.

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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61320 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-18 07:15:07 +00:00
nobu 6b718de1d6 io.c: open generic in binread
* io.c (rb_io_s_binread): fix r61317, unintentional change.

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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-18 07:10:15 +00:00
ko1 c740951f25 check EOPNOTSUPP.
* test/ruby/test_file.rb (test_open_tempfile_path): skip EOPNOTSUPP
  (observed on Ubuntu 16 on Docker).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-18 04:42:53 +00:00
nobu 2ad35b31bb io.c: opening external command
* io.c (rb_io_open_generic): when external command will be invoked
  as other than IO singleton method, probably unintentionally,
  warn if it is File or raise ArgumentError.

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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-18 04:32:54 +00:00
nobu 570642bf15 envutil.rb: define flush method
* test/lib/envutil.rb (verbose_warning): flush is called on STDOUT
  and STDERR sometimes.

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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-18 04:23:16 +00:00
nobu 9940a8d181 test/ruby/test_io.rb: test for r61314
From: Nobuyoshi Nakada <nobu@ruby-lang.org>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-18 04:12:06 +00:00
nobu 7d24c27d21 io.c: open_key_args by rb_io_open
* io.c (open_key_args): open by rb_io_open always also when
  open_args: option is given.

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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-18 03:38:20 +00:00
mame 2e24a66b88 iseq.c (finish_iseq_build): fix coverage leakage [Bug #14191]
Before this change, coverage.so had failed to measure some multiple-line
code fragments.  This is because removing trace instructions (#14104)
changed TracePoint's lineno (new lineno), and coverage counter array was
based on old lineno.
This change initializes coverage counter array based on new lineno.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-18 02:44:36 +00:00
nobu fb6db414a1 vcs.rb: --add-author-from option
From: Nobuyoshi Nakada <nobu@ruby-lang.org>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-18 01:55:55 +00:00
nobu 7766fcc732 st.c: no C99 comment
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-18 01:54:19 +00:00
nobu a531c579f8 Requiring pp is not required now [ci skip]
- Followup of https://bugs.ruby-lang.org/issues/14123

From: Prathamesh Sonpatki <csonpatki@gmail.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61310 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-18 01:51:53 +00:00
watson1978 07d48bbe13 Improve performance of creating Hash object
When generate Hash object, the heap area of st_table will be always allocated in internally
and seems it take a time.

To improve performance of creating Hash object,
this patch will reduce count of allocating heap areas for st_table by reuse them.

	Performance of creating Hash literal -> 1.53 times faster.

[Fix GH-1766] [ruby-core:84008] [Feature #14146]

### Environment

* OS : macOS 10.13.1
* CPU : 1.4 GHz Intel Core i7
* Compiler : Apple LLVM version 9.0.0 (clang-900.0.39)

### Before

$ ./miniruby -v -I. -I../benchmark-ips/lib ~/tmp/bench/literal.rb
ruby 2.5.0dev (2017-11-28 hash 60926) [x86_64-darwin17]
Warming up --------------------------------------
        Hash literal    51.544k i/100ms
Calculating -------------------------------------
        Hash literal    869.132k (± 1.1%) i/s -      4.381M in   5.041574s

### After

$ ./miniruby -v -I. -I../benchmark-ips/lib ~/tmp/bench/literal.rb
ruby 2.5.0dev (2017-11-28 hash 60926) [x86_64-darwin17]
Warming up --------------------------------------
        Hash literal    63.068k i/100ms
Calculating -------------------------------------
        Hash literal      1.328M (± 2.3%) i/s -      6.685M in   5.037861s

### Test code

require 'benchmark/ips'

Benchmark.ips do |x|
  x.report "Hash literal" do |loop|
    count = 0
    while count < loop
      hash = {foo: 12, bar: 34, baz: 56}

      count += 1
    end
  end
end

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-18 01:49:33 +00:00
usa 73da429c36 `BASERUBY` may be not available when building from tarball
* common.mk ($(REVISION_H)): revert a part of r61055 because this obstructs
  building ruby from tarball in clean (no ruby) environment.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61308 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-17 18:43:49 +00:00
svn ae1d6cddef * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-17 18:19:42 +00:00
svn 22ee6b2ccd * 2017-12-18
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-17 18:19:42 +00:00
marcandre 907508b25f Integer#{any|all|no}_bits: Fix coercion. Add specs [#12753]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-17 18:19:41 +00:00
nobu 66bef9d238 common.mk: exts-note [ci skip]
* common.mk (exts-note): show notes of non-configured extension
  libraries.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-17 11:13:23 +00:00
nobu cb26d0d9bb thread.c: adjusted [ci skip]
* thread.c (timeval_add): adjusted indent and parenthesized in
  braces.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-17 09:40:19 +00:00
normal db9523ef47 thread.c: fix overly long Thread#join w/ timeout
* test/ruby/test_thread.rb (test_signal_at_join): test with timeout
* thread.c (sleep_wait_for_interrupt): remove
  (thread_join_sleep): use native_sleep directly to avoid extra
  missing thread status change
  [Bug #14181]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61302 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-17 08:26:17 +00:00
normal 78cc1491d5 thread.c: hoist out timeval arithmetic functions
timeval arithmetic may be reused in other places and this
makes sleep_timeval easier-to-read.

* thread.c (timeval_add): hoist out of sleep_timeval
  (timeval_update_expire): ditto
  (sleep_timeval): use new functions

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-17 08:26:12 +00:00
svn 1389cdaba1 * 2017-12-17
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-17 05:35:28 +00:00
nobu 3b060b22f9 vm_method.c: empty table
* vm_method.c (prepare_callable_method_entry): empty method table
  has no entries.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-17 05:35:28 +00:00
nobu 639fd0874d vm_method.c: debug message
* vm_method.c (method_definition_addref_complement): fix debug
  message, show complemented_count instead of alias_count.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-17 05:35:27 +00:00
nobu b7d6b2299b ruby.c: script __dir__ encoding
* ruby.c (process_options): fallback to the encoding of the script
  name since rb_realpath_internal() cannot convert the encoding
  when it is ASCII-8BIT.

* test/ruby/test_rubyoptions.rb (test___dir__encoding): explicitly
  pass environment variables for locale as they are overriden by
  invoke_ruby.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-16 13:25:11 +00:00
k0kubun 316f58076d vm.c: always export rb_frame_method_id_and_class
Functions declared in include/ruby/backward.h is exported only when
the condition `!defined RUBY_EXPORT && !defined RUBY_NO_OLD_COMPATIBILITY`
is met (i.e. included by include/ruby/ruby.h).

So if it is not the case when ruby is built, this will not be exported.
This was not intentional at r60994.

[Bug #14192]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-16 13:02:25 +00:00
usa f319aa859d should install after test
* common.mk (love): should install after test (but this change does not gurantee
  the order).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-16 06:05:16 +00:00
usa d837e5321d aliases
* tool/merger.rb: aliases for removetag command.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-16 01:56:14 +00:00
mame 0c2f92daad random.c: make sure that Random.urandom returns required-length buffer
getrandom(2) and read(2) (from /dev/urandom) may return a random buffer
whose length is shorter than required.  This change makes sure that they
get enough buffer by using a loop.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-16 00:39:34 +00:00
nobu d2333dd92c test_vm_dump.rb: skip if gcc
* test/ruby/test_vm_dump.rb (assert_darwin_vm_dump_works): gcc seems
  not to chain some frames like Apple's clang.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-16 00:36:31 +00:00