Nobuyoshi Nakada
e31602b78d
Suppress warnings
2019-06-20 17:41:09 +09:00
Jeremy Evans
b9ef35e4c6
Implement Complex#<=>
...
Implement Complex#<=> so that it is usable as an argument when
calling <=> on objects of other classes (since #coerce will coerce
such numbers to Complex). If the complex number has a zero imaginary
part, and the other argument is a real number (or complex number with
zero imaginary part), return -1, 0, or 1. Otherwise, return nil,
indicating the objects are not comparable.
Fixes [Bug #15857 ]
2019-06-19 10:50:58 -07:00
Yusuke Endoh
65944e96d3
test/racc/test_racc_command.rb: Extend the timeout
...
test_opal, test_ruby18, and test_ruby22 are slow tests.
20190619
T105405Z.fail.html.gz
2019-06-19 23:10:40 +09:00
git
b93508b32c
* remove trailing spaces, append newline at EOF.
2019-06-19 18:19:20 +09:00
Hiroshi SHIBATA
2b4024da32
Temporary disabled to invoke assert_output_unchanged.
...
Because some environment created the different results from test fixtures.
2019-06-19 18:18:13 +09:00
Hiroshi SHIBATA
d710321800
Workaround for the external file for racc test
2019-06-19 18:18:04 +09:00
Hiroshi SHIBATA
8a3bd06d27
use TEMP_DIR.
2019-06-19 18:17:59 +09:00
Hiroshi SHIBATA
4cca8c4d20
Use Test::Unit instead of Minitest and fixed test error with ruby repo.
...
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2019-06-19 18:17:53 +09:00
Hiroshi SHIBATA
2272d6ae24
Restore test_dir and update prefix for Dir.mktmpdir.
2019-06-19 18:17:48 +09:00
Hiroshi SHIBATA
9ea1fc27a9
Try to use Dir.mktmpdir.
2019-06-19 18:17:44 +09:00
Hiroshi SHIBATA
c110b59af5
Fixed path for ruby core repository.
2019-06-19 18:17:31 +09:00
Hiroshi SHIBATA
1a2546c2be
Backport racc-1.4.15 from upstream.
2019-06-19 18:17:25 +09:00
Nobuyoshi Nakada
e690df1f1e
Marshal distant past/future
...
[Feature #15160 ]
2019-06-19 15:26:53 +09:00
Nobuyoshi Nakada
8797f48373
New buffer for shared string
...
* string.c (rb_str_init): allocate new buffer if the string is
shared. [Bug #15937 ]
2019-06-19 14:39:19 +09:00
Nobuyoshi Nakada
28678997e4
Preserve the string content at self-copying
...
* string.c (rb_str_init): preserve the embedded content when
self-copying with a capacity. [Bug #15937 ]
2019-06-19 09:44:26 +09:00
Alan Wu
9dec4e8fc3
String#b: Don't depend on dependent string
...
Registering a string that depend on a dependent string as fstring
can lead to use-after-free. See c06ddfe
and 3f95620
for details.
The following script triggers use-after-free on trunk, 2.4.6, 2.5.5
and 2.6.3. Credits to @wanabe for using eval as a cross-version way
of registering a fstring.
```ruby
a = ('j' * 24).b.b
eval('', binding, a)
p a
4.times { GC.start }
p a
```
- string.c (str_replace_shared_without_enc): when given a
dependent string, depend on the root of the dependent
string.
[Bug #15934 ]
2019-06-18 12:18:13 +09:00
Nobuyoshi Nakada
c8e9e0b74b
Fix wrong "void value expression" error
...
* parse.y (value_expr_check): `then` or `else` only `if` is not a
void value expression, as the counterpart is evaluated as `nil`.
[Bug #15932 ]
2019-06-17 22:30:52 +09:00
Nobuyoshi Nakada
01b3a38043
Fix wrong "void value expression" error
...
* parse.y (value_expr_check): if either of `then` or `else`
statements is not a void value expression, the whole `if` is not
also a void value expression. [Bug #15932 ]
2019-06-17 21:44:06 +09:00
Yusuke Endoh
1ff26dc4c7
Revert "Make constant assignments more conforming to JIS X 3017:2013 11.4.2.2.3"
...
This reverts commit 44caca11cf
.
The change caused a build failure.
http://ci.rvm.jp/results/trunk-vm-asserts@silicon-docker/2102153
2019-06-16 23:00:05 +09:00
Yuki Yugui Sonoda
44caca11cf
Make constant assignments more conforming to JIS X 3017:2013 11.4.2.2.3
...
compile.c (NODE_CDECL): Evaluate the module before the value
test/ruby/test_const.rb (test_evaluation_order): added a test case
2019-06-16 22:43:03 +09:00
Nobuyoshi Nakada
5d79054906
Revert github/pull/2230, commit miss
2019-06-15 12:04:16 +09:00
Josh Cheek
46527e1bf4
Test for blank lines between leadinig dot method chains
2019-06-15 11:25:38 +09:00
Josh Cheek
b8730f1251
Multiline method chain with leading dot works for blank lines
2019-06-15 11:25:38 +09:00
Josh Cheek
162bfa1c7c
Test comments between multiline method chain
2019-06-15 11:25:38 +09:00
Yusuke Endoh
5dd8fdd3f3
test/net/imap/test_imap.rb: wait for the server thread to start
...
In some slow CI environments, the invocation of a thread seems very
slow. This causes a test failure to attempt to connect a server that
does not start yet.
20190615
T002420Z.fail.html.gz
20190611
T022407Z.fail.html.gz
2019-06-15 11:06:39 +09:00
Nobuyoshi Nakada
d365fd5a02
An operator is not allowed just after |>
...
https://twitter.com/yukihiro_matz/status/1139454774640726019
2019-06-14 18:17:50 +09:00
Nobuyoshi Nakada
50bb8b6052
Use Exception#full_message for traceback
2019-06-14 08:46:22 +09:00
Yusuke Endoh
56d595198b
test/webrick/test_ssl_server.rb: Use EnvUtil.timeout for timeout scale factor
...
20190613
T091708Z.fail.html.gz
20190612
T011708Z.fail.html.gz
20190611
T211707Z.fail.html.gz
20190604
T171708Z.fail.html.gz
20190529
T091707Z.fail.html.gz
20190528
T031708Z.fail.html.gz
2019-06-13 23:04:41 +09:00
Yusuke Endoh
e75c278183
test/lib/test/unit/assertions.rb (assert_cpu_usage_low): tweak the wait
...
It still fails randomly.
20190613
T093003Z.fail.html.gz
20190613
T051547Z.fail.html.gz
2019-06-13 22:44:01 +09:00
Nobuyoshi Nakada
aa7211836b
Continue to the next line beginning with a pipeline
2019-06-13 22:19:47 +09:00
Nobuyoshi Nakada
043f010c28
parse.y: moved pipeline to expr
...
To allow arguments without parentheses.
2019-06-13 22:03:10 +09:00
Nobuyoshi Nakada
f169043d81
Add pipeline operator [Feature #15799 ]
2019-06-13 18:44:32 +09:00
Nobuyoshi Nakada
e717d6faa8
IO#set_encoding_by_bom
...
* io.c (rb_io_set_encoding_by_bom): IO#set_encoding_by_bom to set
the encoding by BOM if exists. [Bug #15210 ]
2019-06-13 18:13:05 +09:00
Takashi Kokubun
2a26c1ea24
Clarify the Ruby version support status in IRB more
2019-06-13 00:41:00 +09:00
Takashi Kokubun
1808029061
make sync-default-gems GEM=irb
...
Upgrade IRB to 41ea43a4a7
Mostly backport changes.
2019-06-13 00:32:20 +09:00
Nobuyoshi Nakada
88411d350e
Another incomplete string case
2019-06-12 15:30:07 +09:00
Nobuyoshi Nakada
9593e76ac2
Ripper::Lexer: fallback parse error token to the previous one
2019-06-12 15:25:06 +09:00
Jeremy Evans
5e018214e7
Fix SystemStackError when calling a method in an unused refinement
...
Fixes [Bug #15720 ]
2019-06-11 09:43:38 -07:00
Nobuyoshi Nakada
c4cbaef216
assert_cpu_usage_low with timeout scale
...
* test/lib/test/unit/assertions.rb (assert_cpu_usage_low): apply
the timeout scale to measuring period. this assertion is very
runtime environment dependent.
2019-06-11 23:15:46 +09:00
Nobuyoshi Nakada
42f0a8fd6f
MIN_HZ and MIN_MEASURABLE constants
...
* test/lib/test/unit/assertions.rb (Test::Unit::Assertions):
promoted MIN_HZ and MIN_MEASURABLE as constants, which should be
constant through the process.
2019-06-11 23:15:46 +09:00
Nobuyoshi Nakada
eb016d8353
Generalize timeout_scale
...
* test/lib/test/unit.rb (Test::Unit::TimeoutOption): renamed
SubprocessOption.
* test/lib/test/unit.rb (Test::Unit::TimeoutOption#setup_options):
prefer `--timeout-scale` option.
* test/lib/test/unit.rb (Test::Unit::TimeoutOption#non_options):
prefer `ENV["RUBY_TEST_TIMEOUT_SCALE"]`.
2019-06-11 23:15:46 +09:00
Nobuyoshi Nakada
39ae88ad0d
Refined syntax error messages
2019-06-11 22:31:57 +09:00
Nobuyoshi Nakada
140b8117bd
&. is not allowed inside LHS of massign
...
https://hackerone.com/reports/605262
2019-06-11 15:22:16 +09:00
Yusuke Endoh
4adc6f07ef
test/lib/test/unit/assertions.rb (assert_cpu_usage_low): Relax the limit
...
CPU usage 1% causes occesional test failure. Try to use 5%.
20190604
T153002Z.fail.html.gz
20190610
T153002Z.fail.html.gz
2019-06-11 07:17:59 +09:00
Yusuke Endoh
6096baea5d
test/net/http/test_http.rb: Extend the timeout
...
20190610
T071910Z.log.html.gz
2019-06-11 06:45:49 +09:00
Jeremy Evans
6650899248
Make Resolv::DNS#each_name accept Resolv::IPv{4,6} arguments
...
These arguments were previously documented as supported, but not
actually supported.
Patch from Toru Iwase
Fixes [Bug #15900 ]
2019-06-08 20:31:12 -07:00
Nobuyoshi Nakada
562c0bfeda
Split test_strip_bom for each encoding
2019-06-09 12:27:05 +09:00
Nobuyoshi Nakada
a8ef498d6b
Add tests of the encoding with BOM
2019-06-09 11:11:26 +09:00
aycabta
19977cc761
Remove unnecessary variables
2019-06-08 00:14:58 +09:00
Nobuyoshi Nakada
ffaefcadd8
Report a sudden death of workers
2019-06-07 23:49:13 +09:00