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

54063 Коммитов

Автор SHA1 Сообщение Дата
eregon dfe6918604 benchmark/app_aobench.rb: move `srand(0)` at the top
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-21 12:31:10 +00:00
samuel 502f159421 Improvements to documentation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-21 10:56:29 +00:00
nobu 62ec5eb018 parse.y: more token names
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-21 10:24:56 +00:00
glass 12afc11fcd * io.c: use copy_file_range() if defined
* configure.ac: check copy_file_range()

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-21 10:11:04 +00:00
mame 6891a1cd5d string.c (rb_str_dump): Fix the rdoc
* Officially states that String#dump is intended for round-trip.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-21 08:51:51 +00:00
mame 8a294e0f20 benchmark/app_aobench.rb: add `srand(0)`
To prevent noise for benchmark result.  Just for the case.
[Bug #15552]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-21 07:29:00 +00:00
mame be3a0c7042 benchmark/app_aobench.rb: add a magic comment
To support the change of default encoding.
It had not worked correctly since 2.0 :-)
[Bug #15552]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-21 07:13:32 +00:00
glass 9065336909 * lib/net/http.rb: handle Errno::ETIMEDOUT in Net::HTTP#transport_request
A patch from casperisfine (Jean byroot Boussier).
  [Fix GH-2012]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-21 06:23:55 +00:00
k0kubun 954d0815e9 test_io.rb: skip test on MJIT to prevent random failure
like this:
http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/1636642

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-21 01:11:57 +00:00
eregon 4487562da1 Update to ruby/spec@e2fbd4d
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-20 21:25:08 +00:00
eregon 6204e0804b Update to ruby/spec@35a9fba
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-20 20:38:57 +00:00
eregon 58573c33e4 Update to ruby/mspec@e9a482d
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-20 20:38:27 +00:00
stomar 1c53f86bd9 process.c: [DOC] small improvements
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-20 15:07:17 +00:00
stomar f284eb3d54 lib/securerandom.rb: [DOC] small grammar fixes
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-20 15:06:11 +00:00
stomar 6833fbcfaf time.c: [DOC] small improvement
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-20 15:04:41 +00:00
svn 8fe427c112 * 2019-01-21
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-20 15:02:08 +00:00
stomar f9b298fe71 vm.c: [DOC] small fix
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-20 15:02:07 +00:00
kazu afd68cd871 raise FrozenError instead of RuntimeError
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-20 04:44:25 +00:00
svn 27f51081d3 * 2019-01-20
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-20 04:38:55 +00:00
nobu 141ed2f640 [DOC] Refactors documentation for `Forwardable`
[ruby-core:71281] [Misc #11639]

From: Sam Morgan <s_morgan@me.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-20 04:38:52 +00:00
k0kubun 46549d6b11 Revert "mjit_worker.c: try to simplify CC_DLDFLAGS_ARGS"
This reverts commit 405940234e.

Not working on MinGW
https://ci.appveyor.com/project/ruby/ruby/builds/21737578/job/09a2tr94vof6fstt

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-19 09:08:10 +00:00
naruse e90d826de7 Indented here document (<<~) is Ruby 2.3 feature
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-19 07:49:47 +00:00
k0kubun 405940234e mjit_worker.c: try to simplify CC_DLDFLAGS_ARGS
assuming that -nostartfiles is just optional for mingw, cygwin, and AIX.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-19 07:35:30 +00:00
k0kubun a5de8d1ccb mjit_worker.c: do not use GCC_NOSTDLIB_FLAGS for OpenBSD
OpenBSD's GCC compiler has local extensions that break when
`-nostartfiles -nodefaultlibs -nostdlib` is used.

From: Jeremy Evans <merch-redmine@jeremyevans.net>

[Bug #15548]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-19 07:26:59 +00:00
svn 31c862a775 * 2019-01-19
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-19 03:36:25 +00:00
hsbt c52ca1f2ff Revert r58345 and r58371.
These changes break the behavior of default gems. Bug #13428 says
  r58345 is reasonable because gemspec file is installed by `to_ruby_for_cache`
  method. But I revert `to_ruby_for_cache` in rbinstall.rb at r58403.
  There is no reason that we apply r58345 now.

  But I'm not sure about gemspec of default gems affects standalone gems.
  I'm going to investigate it on rubygems/rubygems.

  [Bug #15500][ruby-core:90867]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-19 03:36:22 +00:00
nobu c20aae965e Prefer block_given? to iterator?
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-18 09:52:50 +00:00
nobu 17aeff3e77 make-snapshot: get rid of circular dependency
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-18 09:31:32 +00:00
nobu c4e832bf6f configure.ac: fix build_os name
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-18 06:13:10 +00:00
nobu 3859b77be1 configure.ac: use MINIRUBY as BOOTSTRAPRUBY on msys
Msys shell may not be able to run a command with a drive letter?

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-18 05:14:59 +00:00
nobu 7a86165d43 [DOC] mention rb_str_modify
[ruby-core:91134] [Bug #15543]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-18 02:36:14 +00:00
ko1 b4ab9c0e32 support older BASERUBY for btest.
* bootstraptest/test_insns.rb: check RbConfig::LIMITS to support
  older BASERUBY.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-18 02:04:41 +00:00
nobu 3c55a0b942 configure.ac: use BASERUBY as BOOTSTRAPRUBY if available
MINIRUBY may not be stable enough to run btest, in developing.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-18 01:55:25 +00:00
nobu 6b5695fef9 make-snapshot: make permissions uniform
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-17 23:52:58 +00:00
svn dabbdcfd6d * 2019-01-18
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-17 23:23:19 +00:00
nobu 92c6072ef4 rbinstall.rb: add --exclude option for install-nodoc
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-17 23:23:14 +00:00
hsbt f550da512c Removed old gemspecs of default gems for the Ruby committers.
[Bug #12764][ruby-core:77284]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-17 13:45:48 +00:00
ko1 367fdd1aee reset bound if the size is 0.
* hash.c (RHASH_AR_TABLE_SIZE_DEC): generally, we need to check all
  entries to calculate exact "bound" in ar_table, but if size == 0,
  we can clear bound because there are no active entries.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-17 07:52:47 +00:00
ko1 07298ea209 support btest on older ruby.
* bootstraptest/runner.rb (assert_normal_exit): check MJIT first
  to support btest with ruby ~2.5. btest (bootstraptest) should be
  enable to run with stable ruby interpreter because modified ruby
  may not able to run runner.rb and we need to know why (this is why
  we introduce btest).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-17 01:36:21 +00:00
svn 0280bef341 * 2019-01-17
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66841 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-17 00:36:10 +00:00
nobu d25a27abba call rb_str_modify to make a copy unshared
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-17 00:36:08 +00:00
shirosaki d1417ff8fa dir.c: fix Dir.glob with braces and matching dir
* dir.c (join_path_from_pattern): add the last slash for directory
  matching.

* test/ruby/test_dir.rb (test_glob_recursive_directory): add a test
  for above.
  [ruby-core:91110] [Bug #15540]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-16 14:06:37 +00:00
nobu 74477ec2b3 Strip warnflags
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-16 02:09:48 +00:00
nobu d0318b8cfd Revert r65800
"Makefile.in: reconfig with the original warnflags"
It would be unnecessary since r65803 and r65805.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-16 01:35:28 +00:00
svn 98e218b69a * 2019-01-16
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-16 00:48:46 +00:00
nobu 923d03e10c Fixed a typo, missing `$`
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-16 00:48:42 +00:00
mame ab2547d786 st.c (rb_hash_bulk_insert_into_st_table): avoid out-of-bounds write
"hash_bulk_insert" first expands the table, but the target size was
wrong: it was calculated by "num_entries + (size to buld insert)", but
it was wrong when "num_entries < entries_bound", i.e., it has a deleted
entry.  "hash_bulk_insert" adds the given entries from entries_bound,
which led to out-of-bounds write access.  [Bug #15536]

As a simple fix, this commit changes the calculation to "entries_bound +
size".  I'm afraid if this might be inefficient, but I think it is safe
anyway.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-15 14:19:19 +00:00
nobu 10d85b19da Clarify Array#- and Array#difference documentation
Currently we are not explicit enough regarding the potentially confusing
behavior of `Array#-` and `Array#difference` when it comes to duplicate items
within receiver arrays.

Although the original documentation for these methods does use an array with
multiple instance of the same integers, the explanation for the behavior is
actually imprecise.

> removing any items that also appear in +other_ary+

Not only does `Array#-` remove any items that also appear in `other_ary` but
it also remove any instance of any item in `other_ary`.

One may expect `Array#-` to behave like mathematical subtraction or difference
when it doesn't. One could be forgiven to expect the following behavior:

```ruby
[1,1,2,2,3,3,4,4] - [1,2,3,4]
=> [1,2,3,4]
```

In reality this is the result:

```ruby
[1,1,2,2,3,3,4,4] - [1,2,3,4]
=> []
```

I hope that I've prevented this potential confusion with the clarifications
in this change. I can offer this as evidence of likeliness for confusion:
https://twitter.com/olivierlacan/status/1084930269533085696

I'll freely admit I was surprised by this behavior myself since I needed to
obtain an Array with only one instance of each item in the argument array
removed.

[Fix GH-2068] [ci skip]

From: Olivier Lacan <hi@olivierlacan.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-15 13:52:38 +00:00
nobu d7976d1451 Use `&` instead of `modulo`
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66830 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-15 12:05:46 +00:00
shyouhei d154bec0d5 setbyte / ungetbyte allow out-of-range integers
* string.c: String#setbyte to accept arbitrary integers [Bug #15460]

* io.c: ditto for IO#ungetbyte

* ext/strringio/stringio.c: ditto for StringIO#ungetbyte



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-15 06:41:58 +00:00