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

46399 Коммитов

Автор SHA1 Сообщение Дата
nobu d7f2c72322 string.c: fix types
* string.c (id_normalize, id_normalized_p): fix types, IDs should
  be ID.

* string.c (unicode_normalize_common): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-06 01:01:52 +00:00
svn 4566365d51 * 2017-05-06
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-06 00:54:23 +00:00
nobu 6b4fc043db timestamp for extensions
* common.mk: use the same timestamp file for architecture specific
  directory as the file used in Makefiles under ext.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-06 00:54:22 +00:00
svn cf1844f9b5 * 2017-05-05
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-04 16:47:18 +00:00
normal 1267dad8da benchmark/bm_vm_thread_pass_flood.rb: add comment
I was about to write off this benchmark while working on GVL
improvements on multi-core systems.

However I noticed it exposes a weakness in my work-in-progress
code when I tested on an old single CPU system.  Further testing
reveals setting CPU affinity ("schedtool -a 0x1" on Linux) on a
modern multi-core system is enough to reproduce the problem
exposed by this benchmark.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-04 16:47:17 +00:00
mame fd6dd50f95 time.c: avoid taking a pointer to a member of packed struct
clang 4.0.0 emitted a warning: "taking address of packed member
'subsecx' of class or structure 'vtm' may result in an unaligned
pointer value [-Waddress-of-packed-member]".

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-04 13:42:47 +00:00
stomar 6ae3cf02f7 string.c: [DOC] improve docs for String.new
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-04 13:19:43 +00:00
ktsj 93a6178f56 internal.h (rb_gc_resurrect): remove stale declaration
rb_gc_resurrect is no longer defined since r47444.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-04 10:17:12 +00:00
ktsj 4e6daedc70 string.c: [DOC] Properly refer to keyword argument by its name
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-04 08:59:01 +00:00
ktsj 5c8edab967 dir.c: [DOC] Properly refer to keyword argument by its name [Fix GH-1543]
enc is the name of the variable used in the example, not the name of the
keyword argument (encoding).

The documentation used to wrongly suggest that the keyword argument name was
"enc" which could cause people try try to call `Dir.open("thing", enc: "utf-8")`

Author: Olivier Lacan <hi@olivierlacan.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-04 08:58:59 +00:00
normal 9f9d9e5000 benchmark/bm_vm1_gc_wb_*.rb: fix GC.start args for invalid keyword
"lazy_sweep" does not appear to have ever been a valid kwarg
for GC.start, however the opposite of "lazy_sweep" appears
to be "immediate_sweep".  So use immediate_sweep, and flip
the boolean value of each arg.

I guess this only started failing with r56981 in Dec 2016
("class.c: missing unknown_keyword_error",
 commit e3f0cca2f26ba44c810ac980cdff7dda129ae533)

* benchmark/bm_vm1_gc_wb_ary.rb: "lazy_sweep: false" => "immediate_sweep: true"
* benchmark/bm_vm1_gc_wb_ary_promoted.rb: ditto
* benchmark/bm_vm1_gc_wb_obj.rb: ditto
* benchmark/bm_vm1_gc_wb_obj_promoted.rb: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-04 08:55:54 +00:00
ktsj c20bba2cba gems/bundled_gems: Update to power_assert 1.0.2
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-04 08:13:17 +00:00
normal 2cdc26f868 .gitignore: ignore benchmark/bm_require.data
Followup-to r58562 in SVN

* .gitignore: ignore benchmark/bm_require.data

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-04 07:18:33 +00:00
normal e58f580130 benchmark: ignore bm_require.data/
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-04 07:08:39 +00:00
nobu 9133f6648d parse.y: make shared string modifiable
* parse.y (dedent_string): ensure that the string is modifiable,
  not to set the length of shared string.
  [ruby-core:80987] [Bug #13540]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-04 06:54:11 +00:00
duerst 05e82555e1 revert 58559, because it fails on travis (rubyspec problem)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-04 05:07:20 +00:00
duerst 1e793b64e9 remove enc/prelude.rb from list of prelude files in common.mk
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-04 04:53:33 +00:00
duerst f47033e237 refactor common parts of unicode normalization functions into unicode_normalize_common
In string.c, refactor the common parts (requiring of unicode_normalize/normalize.rb,
check of number of arguments) of the unicode normalization functions
(rb_str_unicode_normalize, rb_str_unicode_normalize_bang, rb_str_unicode_normalized_p)
into the new function unicode_normalize_common.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-04 02:16:27 +00:00
svn a0d4491fb2 * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-04 02:13:12 +00:00
normal cbd34360ac benchmark: new single-threaded read/write benchmark with pipe
This is currently for testing GVL performance in the uncontended
case: IO#write and IO#read unconditionally release GVL for
blocking I/O with pipe.

It will also be interesting to see how this changes if we switch
to M:N threading model.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-04 02:13:11 +00:00
duerst 140560e4ee move definition of String#unicode_normalized? to C to make sure it is documented
* lib/unicode_normalize.rb: Remove definition of String#unicode_normalized?
  (including documentation). Leave a comment explaining that the file is now empty.
* string.c: Define String#unicode_normalized? in rb_str_unicode_normalized_p in C,
  (including documentation)
* lib/unicode_normalize/normalize.rb: Remove (re)definition of
  String#unicode_normalized? to avoid warnings (when $VERBOSE==true) and
  problems when String is frozen

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-04 02:00:19 +00:00
svn 0efb15cda2 * 2017-05-04
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-04 01:36:53 +00:00
duerst 90ab1ee023 move definition of String#unicode_normalize! to C to make sure it is documented
* lib/unicode_normalize.rb: Remove definition of String#unicode_normalize!
  (including documentation)
* string.c: Define String#unicode_normalize! in rb_str_unicode_normalize_bang in C,
  (including documentation)
* lib/unicode_normalize/normalize.rb: Remove (re)definition of
  String#unicode_normalize! to avoid warnings (when $VERBOSE==true) and
  problems when String is frozen

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-04 01:36:52 +00:00
kou 6faa8408e5 rss: Accept empty text element as valid element
Parser has been accepted it but XML serializer wasn't accepted.

Reported by stefano frabetti. Thanks!!!

[ruby-core:80965] [Bug #13531]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-03 12:25:17 +00:00
svn 7abf8bae23 * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-03 12:18:37 +00:00
duerst 5fee67c9ba move definition of String#unicode_normalize to C to make sure it is documented
* lib/unicode_normalize.rb: Remove definition of String#unicode_normalize
  (including documentation)
* string.c: Define String#unicode_normalize in rb_str_unicode_normalize in C,
  (including documentation)
* lib/unicode_normalize/normalize.rb: Remove (re)definition of
  String#unicode_normalize to avoid warnings (when $VERBOSE==true) and
  problems when String is frozen

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-03 12:18:37 +00:00
shugo 8b51a725db net/imap: handle timeouts
Patch by Pavel Rosický.  [Feature #13379] [ruby-core:80440]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-03 11:32:22 +00:00
kazu 929807a9e0 Use `dd` instead of `head -c`
[Bug #13538] [ruby-dev:50106]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-03 02:02:50 +00:00
kazu 5c10fb414a Fix NoMethodError [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-03 01:44:52 +00:00
svn 7e73e70d02 * 2017-05-03
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-02 17:48:10 +00:00
nobu d24c4683f7 ripper/lexer.rb: nested indented heredoc
* ext/ripper/lib/ripper/lexer.rb (on_heredoc_dedent): fix for
  nested indedented here documents, where `Elem`s are nested too.
  [ruby-core:80977] [Bug #13536]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-02 17:48:10 +00:00
nobu 3692fd69ca .travis.yml: tweek after-update
* .travis.yml (before_script): get rid of making miniruby at
  after-update.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-02 13:16:04 +00:00
nobu d5c776ad58 mkconfig.rb: remove cross_compiling
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-02 12:45:07 +00:00
nobu 842a05d2f8 common.mk: BOOTSTRAPRUBY for enc.mk
* common.mk ($(ENC_MK)): use $(BOOTSTRAPRUBY) as well as $(RBCONFIG),
  instead of $(MINIRUBY).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-02 12:45:04 +00:00
kazu 2430822b96 Use `\A` and `\z` instead of `^` and `$` [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-02 11:26:28 +00:00
nobu 6519aba3ba internal.h: rb_raise_static
* internal.h (rb_raise_static): raise with a static message string
  literal.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-02 07:35:20 +00:00
duerst 107f157289 remove unnecessary conditions in lib/unicode_normalize.rb
Because the methods in lib/unicode_normalize.rb are overwritten
by those in lib/unicode_normalize/normalize.rb as soon as one
of them is called, the check for whether UnicodeNormalized is
defined or not is no longer necessary.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-02 05:46:31 +00:00
duerst 8001dae820 rework definition of String#unicode_normalize! and #unicode_normalized?
simplify String#unicode_normalize! and #unicode_normalized?
in lib/unicode_normalize.rb by redefining them
in lib/unicode_normalize/normalize.rb

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-02 05:34:25 +00:00
duerst 42b8713703 rework definition of String#unicode_normalize
simplify String#unicode_normalize in lib/unicode_normalize.rb
by redefining it in lib/unicode_normalize/normalize.rb

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-02 05:15:04 +00:00
svn 43ae954f90 * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-02 02:40:47 +00:00
normal 7ef49716d5 more benchmarks for SizedQueue and ConditionVariable
I'm working on patches to improve everything in thread_sync.c,
add these to track progress.

* benchmark/bm_vm_thread_sized_queue.rb: add description
* benchmark/bm_vm_thread_condvar1.rb: new benchmark
* benchmark/bm_vm_thread_condvar2.rb: ditto
* benchmark/bm_vm_thread_sized_queue2.rb: ditto
* benchmark/bm_vm_thread_sized_queue3.rb: ditto
* benchmark/bm_vm_thread_sized_queue4.rb: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-02 02:40:46 +00:00
kosaki ca8f454f09 nogvl_wait_for_single_fd must wait as its name
poll(fds, n, 0) mean no timeout and immediately return. If you want to
wait something, you need to use -1 instead.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-02 02:19:32 +00:00
svn bad2570a52 * 2017-05-02
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-01 15:17:33 +00:00
nobu ff2422d77c thread.c: suppress warnings [ci skip]
* thread.c (fill_thread_id_string): cast to void pointer to
  suppress warnings when pthread_t is not pointer type.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-01 15:17:32 +00:00
svn 8fabb5f5a8 * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-01 11:40:47 +00:00
hsbt 708a10d35b Merge rubygems-2.6.12 from rubygems/rubygems.
* Details of changes:
    0090800402/History.txt (L3)

  * I kept ko1's commmit related thread issue. It's not merged 2.6 branch on rubygems.
    1721dfa0ea

  * I removed test_realworld_default_gem from rubygems-2.6.12. It fails on
    Ruby trunk. Because it's differences of test suite and environment.
    https://github.com/rubygems/rubygems/pull/1899

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-01 11:40:46 +00:00
hsbt abb8b33011 Merge gemspec from ruby/webrick.
* Bump version to 1.4.0.beta1. Because https://rubygems.org/gems/webrick
    is already reserved old version of webrick.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-01 10:20:35 +00:00
nobu cec0668209 object.c: Kernel#yield_self
* object.c (rb_obj_yield_self): new method which yields the
  receiver and returns the result.
  [ruby-core:46320] [Feature #6721]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-01 07:50:53 +00:00
kazu dabaaafd9f Fix typo in documentation [ci skip]
[Fix GH-1599]
Author:    Liam Sean Brady <liamseanbrady@gmail.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-01 02:42:34 +00:00
nobu d70e47dc6b zlib.c: no buf_filled in zstream
* ext/zlib/zlib.c (zstream): manage capacity and size of `buf`
  instead of size and separated member `buf_filled`.  reported by
  Christian Jalio (jalio) at https://hackerone.com/reports/211958

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-01 02:01:38 +00:00