Nobuyoshi Nakada
b25e27277d
Transform hash keys by a hash [Feature #16274 ]
2019-12-26 15:50:34 +09:00
Yusuke Endoh
81e377023c
range.c: Range#min with a beginless one now raise an explicit exception
...
[Bug #16450 ]
2019-12-25 13:36:23 +09:00
aycabta
622e47a1db
^D on non-empty line in vi mode behaves like Enter
2019-12-25 09:34:13 +09:00
Nobuyoshi Nakada
a3c5dbf291
Scale sleeping times to wait for the OS operations
2019-12-24 18:53:14 +09:00
aycabta
42e2a322f1
The delete-char-or-list shows completed list when called at end of line
...
It doesn't behave the same as the delete-char.
2019-12-24 18:34:43 +09:00
Nobuyoshi Nakada
81504e83e7
Synchronize with a Queue instead of sleeping
2019-12-24 15:48:08 +09:00
Koichi Sasada
47ad57f245
Revert "Scale sleeping times"
...
This reverts commit e57d619421
.
Test fails:
http://ci.rvm.jp/results/trunk-gc-asserts@ruby-sky1/2518563
http://ci.rvm.jp/results/trunk-gc_compact@silicon-docker/2518533
2019-12-24 15:38:46 +09:00
Nobuyoshi Nakada
e57d619421
Scale sleeping times
2019-12-24 14:56:17 +09:00
Nobuyoshi Nakada
e954be14d0
Get rid of false positive misspellings
...
[Bug #16437 ]
2019-12-24 10:33:32 +09:00
aycabta
adc9b3ca7f
[ruby/rdoc] Support newline in the middle of constant definition
...
https://github.com/ruby/rdoc/commit/74d3984324
2019-12-24 07:58:53 +09:00
aycabta
e50e552693
[ruby/rdoc] Treat Proc#call syntax sugar for constant correctly
...
https://github.com/ruby/rdoc/commit/957d041ae0
2019-12-24 07:58:53 +09:00
Marc-Andre Lafortune
819b604037
Reword keyword arguments warning messages to convey these are deprecation warnings
2019-12-23 16:47:33 -05:00
Koichi Sasada
a96f8cecc2
ObjectSpace._id2ref should check liveness.
...
objspace->id_to_obj_tbl can contain died objects because of lazy
sweep, so that it should check liveness.
2019-12-23 15:04:56 +09:00
Yuki Nishijima
672a61b97f
Port dd1dd86e6c
2019-12-23 00:47:41 -05:00
NAKAMURA Usaku
204dc3f39f
Revert "Should return "." for File.extname("file.") also on Windows"
...
We want to introduce consistency and better compatibility with unixen,
but the Windows APIs doues not have consistency fundamentally and
we can not found any logical way...
This reverts commit 61aff0cd18
.
2019-12-23 11:54:25 +09:00
Koichi Sasada
cf59e1476d
fix a thread test.
...
* Use Queue for synchronization.
* Don't use `sleep 0.2` and use `th.join` because created thread
can raise an exception after 0.2 seconds.
2019-12-22 06:29:52 +09:00
Yusuke Endoh
75acbd5f00
compile.c: avoid newarraykwsplat for arguments
...
`foo(*rest, post, **empty_kw)` is compiled like
`foo(*rest + [post, **empty_kw])`, and `**empty_kw` is removed by
"newarraykwsplat" instruction.
However, the method call still has a flag of KW_SPLAT, so "post" is
considered as a keyword hash, which caused a segfault.
Note that the flag cannot be removed if "empty_kw" is not always empty.
This change fixes the issue by compiling arguments with "newarray"
instead of "newarraykwsplat".
[Bug #16442 ]
2019-12-22 03:35:29 +09:00
NAKAMURA Usaku
61aff0cd18
Should return "." for File.extname("file.") also on Windows
...
But not changes another cases, such as "file.rb."
[Bug #15267 ]
2019-12-22 02:42:09 +09:00
Alan Wu
85a337f986
Kernel#lambda: return forwarded block as non-lambda proc
...
Before this commit, Kernel#lambda can't tell the difference between a
directly passed literal block and one passed with an ampersand.
A block passed with an ampersand is semantically speaking already a
non-lambda proc. When Kernel#lambda receives a non-lambda proc, it
should simply return it.
Implementation wise, when the VM calls a method with a literal block, it
places the code for the block on the calling control frame and passes a
pointer (block handler) to the callee. Before this commit, the VM
forwards block arguments by simply forwarding the block handler, which
leaves the slot for block code unused when a control frame forwards its
block argument. I use the vacant space to indicate that a frame has
forwarded its block argument and inspect that in Kernel#lambda to detect
forwarded blocks.
This is a very ad-hoc solution and relies *heavily* on the way block
passing works in the VM. However, it's the most self-contained solution
I have.
[Bug #15620 ]
2019-12-21 09:08:52 -05:00
Yusuke Endoh
ea405ee8ed
test/ruby/test_pattern_matching.rb: suppress "unused variable" warning
2019-12-21 10:06:14 +09:00
Nobuyoshi Nakada
484c1be895
Added `-W:experimental` command line option
...
[Feature #16420 ]
2019-12-20 23:51:17 +09:00
Nobuyoshi Nakada
07e595fdbd
Added `experimental` warning category
...
[Feature #16420 ]
2019-12-20 23:48:15 +09:00
Nobuyoshi Nakada
a84ad24386
Added -W: command line option
...
To manage `Warning[category]` flags. Only `-W:deprecated` and
`-W:no-deprecated` are available now. [Feature #16345 ]
2019-12-20 23:05:22 +09:00
Yusuke Endoh
f7aee58498
vm_args.c: rephrase the warning message of keyword argument separation
...
(old)
test.rb:4: warning: The last argument is used as the keyword parameter
test.rb:1: warning: for `foo' defined here; maybe ** should be added to the call?
(new)
test.rb:4: warning: The last argument is used as keyword parameters; maybe ** should be added to the call
test.rb:1: warning: The called method `foo' is defined here
2019-12-20 19:41:15 +09:00
Nobuyoshi Nakada
2b2030f265
Refined the warning message for $, and $;
...
[Bug #16438 ]
2019-12-20 15:09:23 +09:00
Nobuyoshi Nakada
7a94225e7d
Refined the warning message for numbered-parameter like variables
...
[Bug #16438 ]
2019-12-20 14:58:51 +09:00
Nobuyoshi Nakada
a8bddb3a18
Refined the warning message for numbered-parameter like variables
...
[Bug #16438 ]
2019-12-20 14:34:32 +09:00
Nobuyoshi Nakada
435a4ca2a3
Makes the receiver to FrozenError.new a keyword parameter
...
[Feature #16419 ]
2019-12-20 14:18:20 +09:00
Nobuyoshi Nakada
e68999c82c
Fixed misspellings
...
Fixed misspellings reported at [Bug #16437 ], for default gems.
2019-12-20 12:19:45 +09:00
Hiroshi SHIBATA
e672494cd7
Merge RubyGems 3.1.2
2019-12-20 11:50:32 +09:00
Nobuyoshi Nakada
db16629008
Fixed misspellings
...
Fixed misspellings reported at [Bug #16437 ], only in ruby and rubyspec.
2019-12-20 09:32:42 +09:00
Nobuyoshi Nakada
2898367b3a
Warn also numbered parameter like methods
2019-12-20 08:18:19 +09:00
Nobuyoshi Nakada
27ddb6e998
Warn also numbered parameter like parameters
...
[Feature #16433 ]
2019-12-20 01:25:34 +09:00
Nobuyoshi Nakada
7aa8a78674
Manage deprecation warnings about keyword argument
2019-12-19 09:52:17 +09:00
Nobuyoshi Nakada
9bf9de3d9d
Made the warning for deprecated constants follow the category flag
2019-12-19 09:52:16 +09:00
Nobuyoshi Nakada
fcd8bafd08
Use a temporary file for chown test
...
Errno::EROFS may occur when the source tree is placed in a
read-only filesystem.
2019-12-18 13:35:58 +09:00
Nobuyoshi Nakada
c147eeff7c
[ruby/io-console] Skip Interrupt test on Linux
...
Hangs up only in ruby/ruby on Travis-CI.
https://github.com/ruby/io-console/commit/de39aa6dd6
2019-12-18 13:30:52 +09:00
Nobuyoshi Nakada
77e3078ede
[ruby/io-console] Set raw mode strictly same as cfmakeraw
...
* Default VMIN and VTIME to minimum input.
* Disable parity check bits explicitly.
* Disable all bits for flow control on input.
Co-Authored-By: NARUSE, Yui <naruse@airemix.jp>
https://github.com/ruby/io-console/commit/5ce201a686
2019-12-18 10:33:05 +09:00
Nobuyoshi Nakada
bcec03af05
Revert "Skip interruptible raw mode test on Travis-CI"
...
This reverts commit 65731a1330
.
2019-12-18 00:08:21 +09:00
Nobuyoshi Nakada
07ed8f2f91
[ruby/io-console] Skip interrupt
...
https://github.com/ruby/io-console/commit/8ed5a2bcc3
2019-12-18 00:08:04 +09:00
Nobuyoshi Nakada
905a926ea8
[ruby/io-console] Timeout in the child process
...
https://github.com/ruby/io-console/commit/b8411689a5
2019-12-17 23:55:24 +09:00
Nobuyoshi Nakada
4b7d27ca0d
[ruby/io-console] Use IO.console instead of STDIN
...
https://github.com/ruby/io-console/commit/9e3ec5b936
2019-12-17 23:55:22 +09:00
Nobuyoshi Nakada
65731a1330
Skip interruptible raw mode test on Travis-CI
2019-12-17 17:18:42 +09:00
Nobuyoshi Nakada
9421c78041
[ruby/logger] Fixed leaked tempfile
...
https://github.com/ruby/logger/commit/fb3eff153f
2019-12-17 14:01:40 +09:00
Nobuyoshi Nakada
81eb2d16ef
[ruby/io-console] Disable implementation-defined special control characters
...
In raw mode with interrupt enabled.
https://github.com/ruby/io-console/commit/e9e8e3ff17
2019-12-17 13:55:04 +09:00
Nobuyoshi Nakada
ec89a0f803
[ruby/io-console] Added the test for intr option
...
https://github.com/ruby/io-console/commit/4f01db102d
2019-12-17 13:55:04 +09:00
aycabta
64ce658ec5
Fix return condition according to the condition to skip
2019-12-17 13:30:54 +09:00
aycabta
618d091151
Support change search direction
2019-12-17 13:10:39 +09:00
aycabta
a14a0244b4
Support forward-search-history by C-s
2019-12-17 13:07:19 +09:00
Nobuyoshi Nakada
c687be4bc0
Added a test for [Bug #16159 ]
2019-12-17 11:53:30 +09:00