NAKAMURA Usaku
830e40ee05
Skip on Windows now when using reline because it causes hang of whole tests
2019-04-30 19:45:44 +09:00
aycabta
94b740b249
Use Ripper for IRB
...
The debug option of IRB is deleted because it's just for IRB's pure Ruby
parser.
2019-04-30 14:40:06 +09:00
aycabta
567cb1ae1d
Use Encoding::UTF_8 if RELINE_TEST_ENCODING doesn't exist
2019-04-30 12:53:24 +09:00
aycabta
319eee0f4a
Use Encoding::UTF_8 if Encoding.default_external is Encoding::IBM437
2019-04-30 12:33:24 +09:00
aycabta
17350c7e55
Add Reline as a fallback library for Readline
...
* lib/reine.rb, lib/reline/*: Reline is a readline stdlib compatible
library.
* lib/readline.rb: Readline uses a fallback to Reline when ext/readline
doesn't exist.
* tool/sync_default_gems.rb: add ruby/reline as a default gem.
* appveyor.yml: add "set RELINE_TEST_ENCODING=Windows-31J" for test suit
of Reline, and add "--exclude readline" to "nmake test-all" on Visual
Studio builds because of strange behavior.
* spec/ruby/library/readline/spec_helper.rb: skip Reline as with
RbReadline.
2019-04-30 11:44:20 +09:00
Nobuyoshi Nakada
1432471a75
Disallow also CR in here-doc identifier
...
* parse.y (heredoc_identifier): CR in here-document identifier
might or might not result in a syntax error, by the EOL code.
make a syntax error regardless of the EOL code.
2019-04-29 13:47:20 +09:00
Nobuyoshi Nakada
23375c8b81
Make only mesg
can be assigned with default fname
2019-04-29 13:42:50 +09:00
Nobuyoshi Nakada
330b376133
parse.y: fix here-doc identifier with newline
...
* parse.y (heredoc_identifier): quoted here-document identifier
must end within the same line.
the only corner case that here-document identifier can contain a
newline is that the closing qoute is placed at the beginning of
the next line, and has been warned since 2.4.
```ruby
<<"EOS
" # warning: here document identifier ends with a newline
EOS
```
2019-04-29 12:49:59 +09:00
Yusuke Endoh
6bedbf4625
numeric.c: Extend Integer#[] to support range arguments
...
````
0b01001101[2, 4] #=> 0b0011
0b01001100[2..5] #=> 0b0011
0b01001100[2...6] #=> 0b0011
^^^^
````
[Feature #8842 ]
2019-04-28 23:40:57 +09:00
Yusuke Endoh
cb55024613
test/ruby/test_integer.rb: Add a sane test for Integer#[]
2019-04-28 23:23:00 +09:00
Takashi Kokubun
f2d7ba6a74
make sync-default-gems GEM=irb
...
from e8e79d569e
.
This colorizes Range object on IRB inspect.
2019-04-28 21:51:37 +09:00
Takashi Kokubun
8711f77a26
make sync-default-gems GEM=irb
...
from 96f05e7268
.
Just syncing newer test changes so that conflicts do not happen when trunk is
modified and we need to backport that to ruby/irb.
2019-04-28 20:34:11 +09:00
Takashi Kokubun
588f212c26
make sync-default-gems GEM=irb
...
from 44301d3827
.
This includes some fixes for string interpolation highlight fixes.
2019-04-28 20:18:45 +09:00
David Rodríguez
d0a5467320
Update rubygems with latest upstream changes
...
Closes: https://github.com/ruby/ruby/pull/2154
2019-04-28 11:07:45 +09:00
Jeremy Evans
a15f7dd1fb
Always mark the string returned by File.realpath as tainted
...
This string can include elements that were not in either string
passed to File.realpath, even if one of the strings is an
absolute path, due to symlinks:
```ruby
Dir.mkdir('b') unless File.directory?('b')
File.write('b/a', '') unless File.file?('b/a')
File.symlink('b', 'c') unless File.symlink?('c')
path = File.realpath('c/a'.untaint, Dir.pwd.untaint)
path # "/home/testr/ruby/b/a"
path.tainted? # should be true, as 'b' comes from file system
```
[Bug #15803 ]
2019-04-28 10:47:51 +09:00
git
ed4f331879
* remove trailing spaces.
2019-04-28 02:02:30 +09:00
Takashi Kokubun
cae0b73214
make sync-default-gems GEM=irb
...
from 89e9add06d
.
This adds syntax highlight support for Module on inspect.
In addition to that, I'm adding a trailing space in test_color.rb for
testing ruby-commit-hook's auto-style.
2019-04-28 02:01:04 +09:00
Takashi Kokubun
9348643575
make sync-default-gems GEM=irb
...
Synced from 5feb361ed8
.
This includes a support to colorize named Class instance on IRB inspect.
2019-04-27 22:01:11 +09:00
Nobuyoshi Nakada
3f9562015e
Get rid of indirect sharing
...
* string.c (str_duplicate): share the root shared string if the
original string is already sharing, so that all shared strings
refer the root shared string directly. indirect sharing can
cause a dangling pointer.
[Bug #15792 ]
2019-04-27 21:26:42 +09:00
Takashi Kokubun
5f6ba669ff
Isolate TestGCCompact from JIT testing
...
Wercker seems to randomly fail
5cc3c1c423
To help debugging, let me isolate the impact from GC.compact in the JIT
testing on Wercker.
2019-04-27 12:28:52 +09:00
Takashi Kokubun
569c1ef6f1
make sync-default-gems GEM=irb
...
Backport changes from ruby/irb.
2019-04-27 11:42:40 +09:00
naruse
782e487260
suppress warning in test/irb
...
20190421
T040003Z.fail.html.gz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Re-committing 7f09b5e9da
2019-04-27 11:31:30 +09:00
Takashi Kokubun
a429b3601f
Revert "Class instance should be also colorable on IRB"
...
This reverts commit 6669c966d2
.
It seems to make tests fail... let me fix this later.
2019-04-26 18:46:43 +09:00
Takashi Kokubun
6669c966d2
Class instance should be also colorable on IRB
...
inspect.
Change is made with: `$ make -C .ruby sync-default-gems GEM=irb`
2019-04-26 18:42:51 +09:00
Takashi Kokubun
52cfb17086
make sync-default-gems GEM=irb
...
from e6739d8c66
2019-04-26 18:28:57 +09:00
Nobuyoshi Nakada
54eac83b2a
Hide internal IDs
...
* parse.y (internal_id): number the ID serial for internal use by
counting down from the neary maximum value, not to accidentally
match permanent IDs.
[Bug #15768 ]
2019-04-26 09:33:48 +09:00
Takashi Kokubun
0408b8b390
Syntax-highlight yield in IRB
2019-04-26 01:43:14 +09:00
Takashi Kokubun
5fe99aefd3
Support highlighting Regexp in inspect
2019-04-26 01:15:30 +09:00
Takashi Kokubun
0c54d2e2c7
Force IRB::Color to recognize TERM
...
Closes: https://github.com/ruby/ruby/pull/2150
2019-04-26 00:47:43 +09:00
Takashi Kokubun
b55201dd09
Colorize IRB's inspect result
...
Closes: https://github.com/ruby/ruby/pull/2150
2019-04-26 00:47:40 +09:00
Takashi Kokubun
94af6cd383
Colorize IRB's code_around_binding
...
Closes: https://github.com/ruby/ruby/pull/2150
2019-04-26 00:47:39 +09:00
Masatoshi SEKI
68e3f8192b
add DRbObject dereference test (Preparation for investigation of Bug #15711 )
2019-04-25 01:08:54 +09:00
Kazuhiro NISHIYAMA
dd5b6c71c6
Fix typos [ci skip]
2019-04-25 00:52:16 +09:00
Nobuyoshi Nakada
f1a52d96a5
Defer setting gc_stress until inits done
...
[Bug #15784 ]
2019-04-24 13:02:01 +09:00
Aaron Patterson
75061f46ae
Fix complex hash keys to work with compaction
...
For example when an array containing objects is a hash key, the contents
of the array may move which can cause the hash value for the array to
change. This commit makes the default `hash` value based off the
object id, so the hash value will remain stable.
Fixes test/shell/test_command_processor.rb
2019-04-23 14:21:15 -07:00
Nobuyoshi Nakada
f4f66bd11c
Revert "IRB is improved with Reline and RDoc, take 2"
...
Accidentally merged when 89271d4a37
"Adjusted indents".
2019-04-23 21:55:29 +09:00
aycabta
f2cd4f4cd0
IRB is improved with Reline and RDoc, take 2
2019-04-23 20:08:02 +09:00
Seiei Miyagi
6ca9e7cc07
Disallow numbered parameter as the default value of optional argument
...
[Fix GH-2139] [Bug #15783 ]
2019-04-23 12:16:15 +09:00
Seiei Miyagi
ae07b66aaa
Fix internal error of ->x:@2{}
...
[Fix GH-2139] [Bug #15783 ]
2019-04-23 12:16:14 +09:00
SHIBATA Hiroshi
6a2c8e46f6
Use github url instead of ViewVC.
2019-04-22 20:00:32 +09:00
aycabta
51cec00953
Revert "IRB is improved with Reline and RDoc"
...
This reverts commit 7f273ac6d0
.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-21 09:13:49 +00:00
aycabta
9c51ef5bc4
Merge upstream of Reline
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-21 07:37:34 +00:00
aycabta
221e293733
Add test/reline/ again, I'm back
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-21 07:08:26 +00:00
nobu
d9a01bc17a
Remove unused variable and check if successed
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-21 06:08:00 +00:00
naruse
7f09b5e9da
suppress warning in test/irb
...
20190421
T040003Z.fail.html.gz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-21 05:48:35 +00:00
ktsj
710e763e72
test/ruby/test_pattern_matching.rb: add missing tests for NODE_DASGN, NODE_LASGN
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-21 03:56:42 +00:00
aycabta
2dc51bf447
Remove test/reline temporary, I'll come back
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-21 03:51:26 +00:00
ko1
2a5ea43507
add ensure to restore $stdout correctly.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-21 03:46:25 +00:00
nobu
b02f368c82
Restore pwd
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-21 03:38:52 +00:00
nobu
a3adb11fa6
test/reline/helper.rb: define RELINE_TEST_ENCODING always
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-21 03:30:48 +00:00