55987 Commits

Author SHA1 Message Date
Nobuyoshi Nakada
3034d666e8
Just use File.readlines 2019-06-01 14:57:36 +09:00
git
b487b39b85 * expand tabs. 2019-06-01 13:34:55 +09:00
Yusuke Endoh
65e63af377 Make opt_aref instruction support Integer#[]
only when its receiver and the argument are both Integers.

Since 6bedbf4625, Integer#[] has supported a range extraction.
This means that Integer#[] now accepts multiple arguments, which made
the method very slow unfortunately.

This change fixes the performance issue by adding a special handling for
its traditional use case: `num[idx]` where both `num` and `idx` are
Integers.
2019-06-01 13:15:43 +09:00
aycabta
7df65ef676 Use inputrc data for keystroke setting 2019-06-01 09:06:27 +09:00
Nobuyoshi Nakada
c1e5299787
Fix FrozenError when assigning frozen class to constant
* variable.c (set_namespace_path): modules/classes can get named
  by assignment to constant, even if frozen.  [Bug #15891]
2019-06-01 02:41:14 +09:00
MSP-Greg
aeb9a0ca77
appveyor.yml again!
This issuse is caused by MSYS2 changing from using ncurses to pdcurses.
Appveyor's MSYS2 is so out-of-date that partial updates are 'troublesome'...
2019-06-01 02:16:34 +09:00
Benoit Daloze
1d37cc1900 Update to ruby/spec@cfe908c 2019-05-31 19:02:08 +02:00
Benoit Daloze
f97979ce88 Update to ruby/mspec@a57a9af 2019-05-31 19:02:06 +02:00
Nobuyoshi Nakada
552c42f51f
Seprate raw keystroke config for each platforms 2019-06-01 00:41:17 +09:00
git
8fc552adee * 2019-06-01 2019-06-01 00:03:18 +09:00
aycabta
88770c2ab6 Support Home and End key to move to beg and end 2019-06-01 00:02:35 +09:00
aycabta
21a43489b1 Use IO#sync= instead of a monkey patch 2019-05-31 22:53:01 +09:00
aycabta
73890d9d79 Flush I/O immediately if RELINE_STDERR_TTY is set 2019-05-31 22:33:08 +09:00
Hiroshi SHIBATA
913661cca0
Bump irb version to 1.1.0.pre.1.
Becausee the current irb support reline and have many of changes.
2019-05-31 16:15:43 +03:00
Nobuyoshi Nakada
1457ad1ea7
[DOC] JIS X 0301 has been updated
[ruby-dev:50790]
* https://www.meti.go.jp/press/2019/05/20190520006/20190520006.html
* https://www.meti.go.jp/press/2019/05/20190520006/20190520006-2.pdf

[ci skip]
2019-05-31 19:20:59 +09:00
Nobuyoshi Nakada
8b39df854d
Let irb use an empty file as irbrc
to get rid of side-effect by existing .irbrc file.
2019-05-31 16:32:27 +09:00
Nobuyoshi Nakada
b632566d33
UNIX domain socket name length has a certain limit 2019-05-31 16:32:27 +09:00
Nobuyoshi Nakada
b1aecef873
Use UNALIGNED_MEMBER_PTR
* internal.h (UNALIGNED_MEMBER_ACCESS, UNALIGNED_MEMBER_PTR):
  moved from eval_intern.h.

* compile.c iseq.c, vm.c: use UNALIGNED_MEMBER_PTR for `entries`
  in `struct iseq_catch_table`.

* vm_eval.c, vm_insnhelper.c: use UNALIGNED_MEMBER_PTR for `body`
  in `rb_method_definition_t`.
2019-05-31 16:04:16 +09:00
Alan Wu
ea42423908
Keep vm->orig_progname alive
`vm->orig_progname` can be different from `vm->progname` when user
code assigns to `$0`. While `vm->progname` is kept alive by the
global table, nothing marked `vm->orig_progname`.

[Bug #15887]
2019-05-31 14:38:35 +09:00
Nobuyoshi Nakada
83f9183a7e
Also GCC 9 provides -Waddress-of-packed-member 2019-05-31 14:05:01 +09:00
Nobuyoshi Nakada
d2f663d6f1
STATIC_ASSERT for VM_METHOD_TYPE_MINIMUM_BITS 2019-05-31 10:55:38 +09:00
Nobuyoshi Nakada
d180e40570
Add --limit option and default it to 20 2019-05-31 10:55:37 +09:00
Nobuyoshi Nakada
1e9057b54a
Prefer the current branch or tag name 2019-05-31 10:55:37 +09:00
Nobuyoshi Nakada
fd658ec821
Define RUBY_FULL_REVISION
Only if the short revision differs from the full revision.
2019-05-31 10:55:37 +09:00
Jeremy Evans
e8c710b11a Fix visibility of some methods when using DelegateClass
Public instance methods added to a delegated class after the
creation of the delegate class were not returned by the
public_instance_methods class method of the delegate class.

Protected instance methods in the delegated class when the
delegate class is created were returned by the public_methods
instance method of the delegate class.

Patch mostly from Kenichi Kamiya <kachick1@gmail.com> in
GitHub pull request 926.  Minor changes to get it to apply,
and to fix tests after applying by me.

Fixes [Bug #11512]
2019-05-30 18:34:45 -07:00
Jeremy Evans
1cd93f1cdf Allow DelegateClass() to module_eval given block
Methods that return classes often module_eval the given block
(e.g. Class.new and Struct.new).  This allows DelegateClass to
work similarly.  This makes it easier to use DelegateClass
directly without subclassing, so as not to create an unnecessary
subclass.

Implements [Feature #15842]
2019-05-30 18:34:45 -07:00
Takashi Kokubun
856593cc49
Fix typo 🐛 [ci skip] 2019-05-31 09:44:14 +09:00
Takashi Kokubun
6a5e89e23c
Set git config to commit mjit-debug
As it failed to commit like:
https://app.wercker.com/ruby/ruby/runs/mjit-test1/5cefd8a8105780001c4f2d5d?step=5cefdd1e48fad200077fa3f8
2019-05-31 07:24:11 +09:00
Takashi Kokubun
cb40a21da0
Warn compile_error only when input is finished
Let's say we are in progress to write `"foo"`:

```
irb> "fo
```

at this moment, nothing is wrong.
It would be just a normal way to write `"foo"`.

Prior to this commit, the `fo` part was warned because of
5b64d7ac6e7cbf759b859428f125539e58bac0bd. But I think warning such a
normal input is not valuable for users.

However, we'd like to warn `:@1` or `@@1` which is also a syntax error.
Then this commit switches the syntax highlight based on whether the
input text is finished or not. When it's not finished yet, it does not
warn compile_error.
2019-05-31 06:54:00 +09:00
Takashi Kokubun
6e052817f9
Abstract away Ripper::Lexer#scan in IRB::Color#scan
because 5b64d7ac6e7cbf759b859428f125539e58bac0bd made it hard to
understand #colorize_code for me and this change is needed for my next
commit.
2019-05-31 06:21:17 +09:00
aycabta
8f83fe3b02 Finish with ^D only when input is completely empty in vi insert mode 2019-05-31 05:53:02 +09:00
Benoit Daloze
a4161b7649 Update to ruby/spec@0ba5312 2019-05-30 22:11:24 +02:00
Benoit Daloze
e935a3227d Update to ruby/mspec@3cc36d0 2019-05-30 22:11:22 +02:00
git
c55db6aa27 * 2019-05-31 v2_7_0_preview1 2019-05-31 00:01:41 +09:00
Nobuyoshi Nakada
f7aa80b3fe
Make the target name unique when BASERUBY=no 2019-05-31 00:00:26 +09:00
Nobuyoshi Nakada
ab0c8cc021
Touch Unicode headers and the timestamp before packaging
Not to download Unicode data files at building from the packages.
2019-05-30 23:23:11 +09:00
Nobuyoshi Nakada
f0945176c3
Fix missing gitcmd 2019-05-30 22:27:11 +09:00
NARUSE, Yui
22cd402734 vcs.rb support non-inplace build 2019-05-30 22:20:28 +09:00
Nobuyoshi Nakada
92ecf58b1e
parse.y: adjust here-doc error token
* parse.y (here_document): adjust token to the here-doc identifier
  in compile_error when a here-document misses the closing
  identifier.
2019-05-30 22:03:33 +09:00
Nobuyoshi Nakada
b0e2b7a5ff
Include stack elements left after errors 2019-05-30 21:54:38 +09:00
aycabta
279c8e14d4 Use rebuilt buffer data to rerender all 2019-05-30 20:54:28 +09:00
aycabta
74a0e3ec23 Use start_with? for escaped quote too 2019-05-30 20:06:59 +09:00
aycabta
ecd0f1d966 Use negative lookahead and start_with? 2019-05-30 18:29:26 +09:00
aycabta
fcca39fa73 Fix strange vertical cursor moving when adding a newline at bottom 2019-05-30 18:21:09 +09:00
git
106843d839 * expand tabs. 2019-05-30 17:12:53 +09:00
Koichi Sasada
5fc9f0008f reorder bitmap clearing. 2019-05-30 17:12:26 +09:00
Koichi Sasada
dd63d7da61 move pinned_bits[] position in struct heap_page.
pinned_bits are not used frequently (only GC.compact use it) so
move it at the end of struct heap_page.
2019-05-30 09:10:17 +01:00
Koichi Sasada
e15de86583 introduce during_compacting flag.
Usually PINNED_BITS are not needed (only for GC.compact need it)
so skip updating PINNED_BITS if the marking is not by GC.compact.
2019-05-30 16:52:42 +09:00
Takashi Kokubun
70e87d9660
Do not rely on IRB.conf[:MAIN_CONTEXT] before initialize
so that we can colorize binding.irb source lines.
2019-05-30 15:50:21 +09:00
aycabta
55c34b994b Check the end token of heredoc correctly 2019-05-30 15:34:41 +09:00