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

59898 Коммитов

Автор SHA1 Сообщение Дата
Yusuke Endoh 9feca5ceb9 NEWS.md: converted from NEWS
and NEWS is deleted
2020-01-15 12:42:47 +09:00
Kazuhiro NISHIYAMA ac93cf4ff8
Update version guard
fix up 98ef38ada4
2020-01-15 10:50:53 +09:00
Jean Boussier 98ef38ada4 Freeze Regexp literals
[Feature #8948] [Feature #16377]

Since Regexp literals always reference the same instance,
allowing to mutate them can lead to state leak.
2020-01-15 10:38:47 +09:00
git 07aef4c99a * 2020-01-15 [ci skip] 2020-01-15 10:23:37 +09:00
Koichi Sasada eb4c86a698 Add option hash doc for GC stats.
Add a description about optional hash objects for GC.stat and
GC.latest_gc_info. [Bug #14408]

The patch is provided by sho-h (Sho Hashimoto).
Thank you so much.
2020-01-15 10:20:19 +09:00
aycabta 8c3efa4940 Use Reline.encoding_system_needs if exists 2020-01-14 15:40:38 +09:00
aycabta a2638c0d87 Remove an unused setting variable 2020-01-14 15:40:38 +09:00
aycabta f8ea2860b0 Introduce an abstracted structure about the encoding of Reline
The command prompt on Windows always uses Unicode to take input and print
output but most Reline implementation depends on Encoding.default_external.
This commit introduces an abstracted structure about the encoding of Reline.
2020-01-14 15:40:38 +09:00
Ben c94025b630 [ruby/irb] Fix crashing when multiple open braces per line
https://github.com/ruby/irb/issues/55

If we had put multiple open braces on a line the with no closing brace
spaces_of_nest array keeps getting '0' added to it. This means that when
we pop off of this array we are saying that we should be in position zero
for the next line. This is an issue because we don't always want to be
in position 0 after a closing brace.

Example:
```
[[[
]
]
]
```
In the above example the 'spaces_of_nest' array looks like this after
the first line is entered: [0,0,0]. We really want to be indented 4
spaces for the 1st closing brace 2 for the 2nd and 0 for the 3rd. i.e.
we want it to be: [0,2,4].

We also saw this issue with a heredoc inside of an array.

```
[<<FOO]
hello
FOO
```

https://github.com/ruby/irb/commit/80c69c8272
2020-01-14 15:40:38 +09:00
Ben 9994eb8a5e [ruby/irb] Fix newline depth with multiple braces
This commit fixes the check_newline_depth_difference method to multiple
open braces on one line into account. Before this change we were
subtracting from the depth in check_newline_depth_difference on
every open brace. This is the right thing to do if the opening and
closing brace are on the same line. For example in a method definition we
have an opening and closing parentheses we want to add 1 to our depth,
and then remove it.

```
def foo()
end
```

However this isn't the correct behavior when the brace spans multiple
lines. If a brace spans multiple lines we don't want to subtract from
check_newline_depth_difference and we want to treat the braces the same
way as we do `end` and allow check_corresponding_token_depth to pop the
correct depth.

Example of bad behavior:

```
def foo()
  [
  ]
puts 'bar'
end
```

Example of desired behavior:

```
def foo()
  [
  ]
  puts 'bar'
end
```

https://github.com/ruby/irb/commit/7dc8af01e0
2020-01-14 15:40:38 +09:00
Jun Aruga 440013b2fa Remove s390x from allow_failures 2020-01-14 09:46:52 +09:00
git e0a9b8ecef * 2020-01-14 [ci skip] 2020-01-14 06:58:47 +09:00
John Hawthorn 91601dcc6a Simplify obj2ubits checks
If this value is less than zero, then the mask check is guaranteed to
fail as well, so we might as well rely on that.
2020-01-13 13:58:23 -08:00
John Hawthorn 5f3189474c Avoid rb_check_string_type in month_arg
This will usually receive a fixnum so we should check that first instead
of the more expensive rb_check_string_type check.
2020-01-13 13:58:23 -08:00
John Hawthorn c2e45422f7 Store "UTC" and "" fstring as globals in time.c 2020-01-13 13:58:23 -08:00
Kazuhiro NISHIYAMA 5aa0e6bee9
Mention new feature of Hash#transform_keys [Feature #16273]
ref b25e27277d
2020-01-13 21:22:22 +09:00
Nobuyoshi Nakada f43940633d
test-bundled-gems.rb: Use real paths for symlinks 2020-01-13 12:27:24 +09:00
Nobuyoshi Nakada c9b1969fa3
Checkout with git on cygwin for EOL code
`shell: bash` runs bash on msys which prefers git on msys too,
then checked out in CRLF mode.  Cygwin sed doesn't consider the CR
a part of EOL code, though.
2020-01-13 10:31:53 +09:00
Lourens Naudé 61ff5cd5fd Fix syntax error in obj_free with hash size debug counter when USE_DEBUG_COUNTER is enabled 2020-01-13 08:03:01 +09:00
git 83b8dfac90 * 2020-01-13 [ci skip] 2020-01-13 03:44:08 +09:00
Koichi Sasada 350dafd56a reload AR table body for transient heap.
ar_talbe (Hash representation for <=8 size) can use transient heap
and the memory area can move. So we need to restore `pair' ptr after
`func` call (which can run any programs) because of moving.
2020-01-13 03:36:47 +09:00
Nobuyoshi Nakada e288632f22
Clean generated ChangeLog [ci skip] 2020-01-12 19:54:59 +09:00
Nobuyoshi Nakada 8afd304f41
Ignore existing ChangeLog file and generate always [ci skip] 2020-01-12 19:52:35 +09:00
Nobuyoshi Nakada b34f39e860
vcs.rb: Allow to empty a part in commit log 2020-01-12 19:43:59 +09:00
Nobuyoshi Nakada cccfc66760
Added make target to export the ChangeLog file 2020-01-12 19:39:00 +09:00
git ae69aea3b0 * 2020-01-12 [ci skip] 2020-01-12 12:28:54 +09:00
Hiroshi SHIBATA ca6546704a Allow failures with rss tests on test-bundled-gems 2020-01-12 12:28:29 +09:00
Hiroshi SHIBATA c7ef7d8a73 Also ignored cve_2014_8080_spec 2020-01-12 12:28:29 +09:00
Hiroshi SHIBATA e61cab3a36 Ignore rexml examples on ruby/spec 2020-01-12 12:28:29 +09:00
Hiroshi SHIBATA 83240f315a Make rss library to the bundle gems
[Feature #16485][ruby-core:96683]
2020-01-12 12:28:29 +09:00
Hiroshi SHIBATA c3ccf23d58 Make rexml library to the bundle gems
[Feature #16485][ruby-core:96683]
2020-01-12 12:28:29 +09:00
Nobuyoshi Nakada 012f297311
Get rid of use of magic number 'E' 2020-01-11 20:19:58 +09:00
Kazuhiro NISHIYAMA e62aead269
Add branch option to checkout on push 2020-01-11 16:24:16 +09:00
Nobuyoshi Nakada 7584853cfe
st_delete_wrap is no longer used 2020-01-11 10:43:39 +09:00
Nobuyoshi Nakada eb737916b1
Warn when :newline precedes other newline options 2020-01-11 10:42:22 +09:00
Nobuyoshi Nakada 8bb24712de
Added assertions for newline decorators 2020-01-11 10:42:21 +09:00
git 52a9e4ffd3 * 2020-01-11 [ci skip] 2020-01-11 10:40:57 +09:00
Lourens Naudé 40c57ad4a1 Let execution context local storage be an ID table 2020-01-11 14:40:36 +13:00
Hiroshi SHIBATA b53d8230f1
Fixed the wrong url for benchmark 2020-01-10 22:57:20 +09:00
Hiroshi SHIBATA e04366056a
Update the upstream repository of bundler 2020-01-10 22:56:46 +09:00
Nobuyoshi Nakada 7693897a11
Reduced duplicate code 2020-01-10 21:48:20 +09:00
Nobuyoshi Nakada 1b4d406e3a
Hash#transform_values should return a plain new Hash
[Bug #16498]
2020-01-10 21:44:38 +09:00
卜部昌平 135b533e84 add missing #include 2020-01-10 21:17:15 +09:00
卜部昌平 13064fe5db avoid undefined behaviour when n==0
ISO/IEC 9899:1999 section 6.5.7 states that "If the value of the right
operand is negative or is greater than or equal to the width of the
promoted left operand, the behavior is undefined".  So we have to take
care of such situations.

This has not been a problem because contemporary C compilers are
extraordinary smart to compile the series of shifts into a single
ROTLQ/ROTRQ machine instruction.  In contrast to what C says those
instructions have fully defined behaviour for all possible inputs.
Hence it has been quite difficult to observe the undefined-ness of such
situations.  But undefined is undefined.  We should not rely on such
target-specific assumptions.

We are fixing the situation by carefully avoiding shifts with out-of-
range values.  At least GCC since 4.6.3 and Clang since 8.0 can issue
the exact same instructions like before the changeset.

Also in case of Intel processors, there supposedly be intrinsics named
_rotr/_rotl that do exactly what we need.  They, in practice, are absent
on Clang before 9.x so we cannot blindly use.  But we can at least save
MSVC.

See also:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57157
https://bugs.llvm.org/show_bug.cgi?id=17332
2020-01-10 21:17:15 +09:00
卜部昌平 79dcd26aec more use of MSC_VERSION_SINCE
Replaces `#ifdef _MSC_VER` with more accurate version checks.  Also,
`defined(_WIN64) && defined(__AVX2__)` is redundant because there is no
such tihng like a 32bit AVX2 machine.
2020-01-10 21:17:15 +09:00
卜部昌平 7fed7eb50b fix Windows breakage
Fixing typo revealed that _BitScanReverse is BSR, which behaves
differently than LZCNT.  What we want here is LZCNT so we have to
emulate.
2020-01-10 21:17:15 +09:00
卜部昌平 db0398dc04 fix typos 2020-01-10 21:17:15 +09:00
Nobuyoshi Nakada 0a67c21401 Ensure seed data to be cleared
To prevent from leaking the seed data.
2020-01-10 10:28:49 +09:00
Nobuyoshi Nakada 499de0a0f6 Fill siphash salt directly with random data
Expanding less random data with MT is not needed when it
succeeded.
2020-01-10 10:28:49 +09:00
Nobuyoshi Nakada 54e31f4a5f
Update dependencies for c6b26f5ccf 2020-01-10 09:09:51 +09:00