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

49099 Коммитов

Автор SHA1 Сообщение Дата
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
nobu 7c18db61a1 string.c: multiple codepoints
* string.c (undump_after_backslash): fix multiple codepoints in
  braces.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-16 00:30:52 +00:00
nobu ae18c8f5b6 string.c: suppress warning
* string.c (str_undump): suppress maybe-uninitialized warning by
  gcc 7 and later.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-16 00:03:51 +00:00
normal d02f2996d2 NEWS: update for WEBrick Proc body responses
Better late than never :x [Feature #855]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-15 21:55:50 +00:00
normal 3ed8d3983c NEWS: updates about trivial GVL release changes
No tickets, but all pretty trivial changes which avoids
stalls on slow/non-responsive filesytems.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-15 21:49:21 +00:00
marcandre 4eac6eb373 lib/erb: Update doc [ci-skip] [doc]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-15 20:15:54 +00:00
eregon 30ed82e772 Update to ruby/spec@595645f
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-15 17:44:37 +00:00
svn f941bdf263 * 2017-12-16
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-15 17:44:16 +00:00
eregon 60e21a9e93 Update to ruby/mspec@19d929e
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-15 17:44:15 +00:00
nobu 7c4306e6e9 gperf.sed: static declarations
* tool/gperf.sed: comment out arguments part only, to keep the
  following declarations static.  [Feature #13883]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-15 14:42:43 +00:00
kazu a9419fbd4f [DOC] `IO.new` accepts `external_encoding`
Revert part of r61278 [Bug #13655]
[ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61281 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-15 11:52:41 +00:00
kazu 8197188707 Fix typo [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-15 11:52:40 +00:00
naruse 4b798a3989 initialize should be outside
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-15 09:43:40 +00:00
naruse 9fa7722bbc IO.new doesn't recive "-" as external_encoding [Bug #13655]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-15 08:26:33 +00:00
rhe 42c4ca634d openssl: suppress report_on_exception warning
Import a commit from upstream:

	33a67ac96492 test/utils: disable Thread's report_on_exception in start_server

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-15 08:19:32 +00:00
naruse a32e3fee79 check icc version inside condition
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-15 07:58:02 +00:00