55987 Commits

Author SHA1 Message Date
aycabta
5a229b0a88 Calculate vertical position correctly when rerendering all lines 2019-05-30 15:19:30 +09:00
aycabta
90014dddec Fix broken rendering when the last line is auto-wrapped 2019-05-30 15:04:37 +09:00
aycabta
eae953ba9f Rerender following lines when line number increased 2019-05-30 14:19:58 +09:00
aycabta
1cf9f79342 Clear remaining lines when line number decreased 2019-05-30 14:04:28 +09:00
Nobuyoshi Nakada
4a31c1e45d
parse.y: continue after heredoc error
* parse.y: continue parsing the rest of the here-document starting
  line, after the terminator was not found.
2019-05-30 12:38:50 +09:00
aycabta
cb520e7623 Fix the auto-wrap behabior that was too buggy 2019-05-30 12:29:38 +09:00
Jeremy Evans
f0ded36693 Use Regexp#match instead of #match for 1.9 BASERUBY support 2019-05-29 18:40:03 -07:00
Jeremy Evans
d2ba80b5df Revert "Fix building with 1.8 BASERUBY"
This reverts commit 05bc14d81a1d7f6af826a92371aeff0c3fb2a67e.

We have decided that the cost of reintroducing support for 1.8
BASERUBY outweighs the benefit.  If you are still using 1.8 and want
to build master/trunk, build and install the latest release, and use
that as BASERUBY.
2019-05-29 18:03:21 -07:00
git
5867e51e83 * 2019-05-30 2019-05-30 04:13:37 +09:00
Takashi Kokubun
814eaa25e2
Do not use rb_iseq_path() while moving ISeq pointers
in GC.compact.

While `in_jit` is false, GC.compact is allowed to run and it may be
moving ISeq-related pointers. So calling rb_iseq_path() when `in_jit`
is true is illegal.
2019-05-30 04:12:11 +09:00
Nobuyoshi Nakada
5b64d7ac6e
Colorize errors more
* lib/irb/color.rb (IRB::Color.colorize_code): colorize
  `compile_error` part as same as `on_parse_error`.
2019-05-29 22:09:54 +09:00
Nobuyoshi Nakada
12644e8b02
Get rid of nested string interpolations
* lib/irb/color.rb (IRB::Color.colorize): get rid of nesting string
  interpolations not to confuse ruby-mode.el
2019-05-29 21:59:34 +09:00
Nobuyoshi Nakada
1da5c73932
parse.y: fix state after ivar/cvar
* parse.y (parse_atmark): return EXPR_END or EXPR_ENDFN, depending
  on the previous state, even incomplete names consistently.
2019-05-29 21:42:58 +09:00
aycabta
83e905eb4e Revert "Use "require" just for essential"
This reverts commit ab7a6e1a1651d82d327d155b78a8e3af1d976707.
2019-05-29 20:24:00 +09:00
aycabta
ab7a6e1a16 Use "require" just for essential
The 559dca509d2a98584b09c7d9a6d74749ce793ad7 contains an excess range in
using "require".
2019-05-29 20:21:00 +09:00
aycabta
fafcbe0eb0 Use reversed get_screen_size correctly on Windows 2019-05-29 18:52:34 +09:00
Nobuyoshi Nakada
5ceff480c2
ripper: Ripper::Lexer#scan
* ext/ripper/lib/ripper/lexer.rb (Ripper::Lexer#scan): parses the
  code and returns the result elements including errors.
  [EXPERIMENTAL]
2019-05-29 18:21:28 +09:00
Takashi Kokubun
7c0639f3f8
Never make a method call from MJIT worker
by showing line number only when it's Fixnum.

When it's not Fixnum, we need to call a method to know the line number.
2019-05-29 16:48:07 +09:00
Takashi Kokubun
ce7b1132c5
Do not call FIX2INT while GC.compact may be running
because FIX2INT might crash by moving method entry pointer:
http://ci.rvm.jp/results/trunk-mjit@silicon-docker/2063412
2019-05-29 16:22:27 +09:00
Takashi Kokubun
468b475e61
.travis.yml: Minor reorder for shortening 2019-05-29 16:09:07 +09:00
Takashi Kokubun
1a0c3d8dd6
Convert Enumerator to Array for Ruby 1.9.3
String#lines seems to return Enumerator in Ruby 1.9.3, and it does not
respond to #delete_if https://travis-ci.org/ruby/ruby/jobs/538559919
2019-05-29 15:04:45 +09:00
Takashi Kokubun
5379ca9250
Skip spec broken since a66bc2c01194a9c017c874a30db5b3b6bd95e966
This has not worked since the merge https://travis-ci.org/ruby/ruby/jobs/538438184
2019-05-29 14:57:25 +09:00
Nobuyoshi Nakada
068d327595
Colorize compile_error as same as on_parse_error 2019-05-29 13:34:19 +09:00
Nobuyoshi Nakada
cc66272e50
parse.y: flush invalid char 2019-05-29 13:24:24 +09:00
Nobuyoshi Nakada
8552e9d696
Fix shorten-64-to-32 warning 2019-05-29 13:24:24 +09:00
Kazuhiro NISHIYAMA
aee36bf149
Fix Possible Control flow issues (DEADCODE)
Coverity Scan says `Execution cannot reach this statement: "poison_object(v);"`,
so do nothing when `ptr` is always 0 without address_sanitizer.
2019-05-29 13:16:05 +09:00
Yusuke Endoh
e04d10b28f test/rubygems/test_gem_stream_ui.rb (test_ask_for_password): extend the timeout
for Solaris.

https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable10s/ruby-master/log/20190528T191908Z.fail.html.gz
2019-05-29 13:01:53 +09:00
Koichi Sasada
8187ffa461 Revert "Colorize error part more"
This reverts commit c7f3c222c9b82736c993419daa6bfb643e5c0793.
2019-05-29 04:30:36 +01:00
Nobuyoshi Nakada
c7f3c222c9
Colorize error part more
Colorize `compile_error` parts as well as `on_parse_error` parts.
2019-05-29 12:12:19 +09:00
Nobuyoshi Nakada
34fe1f7d71
Create empty revision.tmp if BASERUBY is not yes 2019-05-29 12:09:25 +09:00
aycabta
3f13297923 Remove extra items because Reline::HISTORY is a sized queue 2019-05-29 10:04:58 +09:00
Nobuyoshi Nakada
c86d1fbed5
Create empty revision.tmp if no BASERUBY 2019-05-29 09:46:44 +09:00
MSP-Greg
f60a59ed20
appveyor.yml - update for msys2 - pdcurses, force toolchain
Closes: https://github.com/ruby/ruby/pull/2208

Merging the PR for fixing AppVeyor msys2 failure related to GCC 9 like:
https://ci.appveyor.com/project/ruby/ruby/builds/24877992/job/ned5k4k5rwxnld5j
2019-05-29 09:14:01 +09:00
Takashi Kokubun
98ba116d40
Revert 3b7862c8e88cd7838a53ec083ac5733386400956 causing various CI hangs
and dependent commits c67934b1c3b40dda5f170b032423e520511c68dd and
f0d1dc5cee87dfb023cb43a2db9bcdef5a8dee8f.

RubyCI and ci.rvm.jp are almost dead by timeout since this commit.

---

Revert "Skip a reline test hanging on Wercker since 3b7862c8e8"

This reverts commit f0d1dc5cee87dfb023cb43a2db9bcdef5a8dee8f.

Revert "Remove extra items because Reline::HISTORY is a sized queue"

This reverts commit c67934b1c3b40dda5f170b032423e520511c68dd.

Revert "Use existing instances for LineEditor and Config"

This reverts commit 3b7862c8e88cd7838a53ec083ac5733386400956.
2019-05-29 09:05:26 +09:00
Takashi Kokubun
797d7efde1
Prevent MJIT compilation from running while moving
pointers.

Instead of 4fe908c1643c3f355edd787bb651aefb53b996c0, just locking the MJIT
worker may be fine for this case. And also we might have the same issue
in all `gc_compact_after_gc` calls.
2019-05-29 08:56:27 +09:00
Takashi Kokubun
6b5e712361
Make tool/vcs.rb compliant to BASERUBY
People seem to consider BASERUBY is either 1.8 or 1.9 now. Since this
file may be executed by BASERUBY from file2lastrev.rb, I think we should
not rely on Ruby 2.0 in this file for now.
2019-05-29 08:22:04 +09:00
Takashi Kokubun
e1f62d7f0e
Check the result of file2lastrev.rb if HAVE_BASERUBY
is yes.

We ignored the failure status of file2lastrev.rb on 73da429c36c, but it
was for an environment without BASERUBY. I think we should skip running
file2lastrev.rb on HAVE_BASERUBY=no, and run it and check the status on
HAVE_BASERUBY=yes.

Otherwise we may have an ignored arbitrary error of file2lastrev.rb on
HAVE_BASERUBY=yes environment.
2019-05-29 08:19:35 +09:00
Takashi Kokubun
f0d1dc5cee
Skip a reline test hanging on Wercker since 3b7862c8e8
like https://app.wercker.com/ruby/ruby/runs/mjit-test1/5cedad11105780001c4e7001?step=5cedaf6b48fad200076fe77b
2019-05-29 08:08:54 +09:00
Takashi Kokubun
67f75d5b43
Add TESTOPTS=-v for Wercker test-all --jit-wait
because it's hard to identify which test causes a hang for now.
2019-05-29 08:04:49 +09:00
aycabta
8d83743170 Use IO.copy_stream 2019-05-29 06:57:47 +09:00
aycabta
a4a682c450 Check RUBY_YES_I_AM_NOT_A_NORMAL_USER env to access RubyVM doc 2019-05-29 06:57:47 +09:00
aycabta
d341bb2857 IRB never show RubyVM's doc 2019-05-29 06:57:47 +09:00
aycabta
d390af3686 Encode completed strings corecctly 2019-05-29 06:54:57 +09:00
Takashi Kokubun
3e54ff67e6
Test BASERUBY: Ruby 1.9.3 on Travis
We have no clear assertion or check of BASERUBY requirement.
I want to make the current situation more explicit.

I'm NOT saying we should support Ruby 1.9.3 here,
but I'm just checking the situation as per 05bc14d81a1d7f6af826a92371aeff0c3fb2a67e.

FYI, at this moment Ruby 1.8.7 did not work with this Travis config, like:
https://travis-ci.org/k0kubun/ruby/builds/538459100
2019-05-29 06:45:33 +09:00
Benoit Daloze
91f5a8db59 Update to ruby/spec@0c5c5c1 2019-05-28 23:15:57 +02:00
aycabta
c67934b1c3 Remove extra items because Reline::HISTORY is a sized queue 2019-05-29 05:58:33 +09:00
aycabta
3b7862c8e8 Use existing instances for LineEditor and Config 2019-05-29 05:53:44 +09:00
Benoit Daloze
a66bc2c011 Update to ruby/spec@9a501a8 2019-05-28 22:41:48 +02:00
Takashi Kokubun
d070523e7b
Drop unused Travis config: universal-darwin17
This has been unused since b7f5c573ef20dbbf5534ee3a45625c7f9d45f2ec.
2019-05-29 05:27:55 +09:00
Takashi Kokubun
462a63c39e
Drop MJIT debug code from GC.compact
As ko1 added some improvements on GC.compact, I want to check if it
solved the problem too.
2019-05-29 05:10:12 +09:00