Commit graph

855 commits

Author SHA1 Message Date
aycabta
6fa37d2666 [ruby/irb] Retrieve completed receiver that is a module or class correctly
b2324727e1
2021-09-04 17:48:20 +09:00
aycabta
b7e2f7759d [ruby/irb] Version 1.3.8.pre.7
02c4a8d3b6
2021-09-04 02:18:54 +09:00
aycabta
119edc459f [ruby/irb] Update dependency, reline >= 0.2.8.pre.7
39593fb4d0
2021-09-04 02:18:50 +09:00
aycabta
3d6a475587 [ruby/irb] Use Reline::Key for trap_key in dialog callback
b05ce3c72d
2021-09-03 04:28:53 +09:00
aycabta
eb92d7c732 [ruby/irb] Add message to show full doc
6370a5d974
2021-09-03 04:28:32 +09:00
aycabta
f793f68264 [ruby/irb] Add Alt+d trap from show doc dialog to show full doc
368327b082
2021-09-03 04:28:27 +09:00
aycabta
ed83a01048 [ruby/irb] Version 1.3.8.pre.6
7dc98df80b
2021-09-02 22:17:01 +09:00
aycabta
1efe5cb020 [ruby/irb] Update dependency, reline >= 0.2.8.pre.6
7896296ae2
2021-09-02 22:16:56 +09:00
aycabta
4e40b7ddb0 [ruby/irb] Detect the variable class to show doc
33b9bec954
2021-09-02 21:39:55 +09:00
aycabta
80309800f1 [ruby/irb] Version 1.3.8.pre.5
968422799c
2021-08-31 15:23:54 +09:00
aycabta
a512496b3f [ruby/irb] Update dependency, reline >= 0.2.8.pre.5
657bd3fd12
2021-08-31 15:23:47 +09:00
aycabta
817694481c [ruby/irb] Set the dialog width to render with a fixed width
80c4329643
2021-08-31 15:20:34 +09:00
aycabta
077bc98ce4 [ruby/irb] Follow that Dialog#contents_width has been renamed to #width
49a73d929e
2021-08-31 15:20:27 +09:00
aycabta
a8e6a850d5 [ruby/irb] Make show doc dialog appears on the left at the right edge
6480eddd31
2021-08-31 15:20:22 +09:00
aycabta
cf0ece810a [ruby/irb] Rename a variable "dialog" with "autocomplete_dialog"
Because it's just used to receive data from the autocomplete dialog, not
for show doc dialog.

f8b752bd98
2021-08-31 15:20:17 +09:00
aycabta
4a174b7c55 [ruby/irb] Version 1.3.8.pre.4
61fe6cfa43
2021-08-31 05:30:09 +09:00
aycabta
96131c5ae9 [ruby/irb] Update dependency, reline >= 0.2.8.pre.4
24315382d0
2021-08-31 05:30:04 +09:00
aycabta
c63d98b401 [ruby/irb] Use DialogRenderInfo
5bc3a72ca3
2021-08-31 05:24:55 +09:00
aycabta
b30be9f222 [ruby/irb] Take dialog to get scroll_top
7209082a11
2021-08-31 05:24:45 +09:00
aycabta
16cf2ef6f2 [ruby/irb] Don't show doc when pointer is negative
48af34bfc2
2021-08-31 05:24:36 +09:00
aycabta
7379a493bd [ruby/irb] Version 1.3.8.pre.3
a1fc68abaa
2021-08-30 12:00:35 +09:00
aycabta
aeec02d7f3 [ruby/irb] [].name to display the doc for Array.name
7c2abc14d8
2021-08-30 11:58:56 +09:00
aycabta
1e2f10e8aa [ruby/irb] Rescue unknown error to quash crashing
92cce941cb
2021-08-30 11:58:51 +09:00
aycabta
ece4ed0da7 Add --autocomplete / --noautocomplete options 2021-08-30 02:45:13 +09:00
aycabta
60eb328d42 [ruby/irb] Version 1.3.8.pre.2
ff111173fd
2021-08-30 02:34:18 +09:00
aycabta
b35eff27dd [ruby/irb] Update dependency, reline >= 0.2.8.pre.3
2f1d989d7c
2021-08-30 02:33:34 +09:00
aycabta
4750dfa6db [ruby/irb] Update dependency to "reline >= 0.2.7.pre.2" for Reline.autocomplete=()
66178f34b9
2021-08-30 02:33:21 +09:00
aycabta
5f7c2291d6 [ruby/irb] Version 1.3.8.pre.1
9f82ae66fc
2021-08-29 20:33:21 +09:00
aycabta
eadd25d5af [ruby/irb] Update dependency to "reline >= 0.2.7.pre.1" for use dialog feature in tests
df04a9a881
2021-08-29 20:30:07 +09:00
aycabta
cde84a5baa [ruby/irb] Rescue NotFoundError of RDoc::RI::Driver#expand_name
c5f13b23d7
2021-08-29 20:30:01 +09:00
aycabta
ae4e301d5d [ruby/irb] Add show doc dialog for Reline
026700499d
2021-08-29 20:29:54 +09:00
aycabta
f9abcfb6fc [ruby/irb] Version 1.3.7
98610236ec
2021-08-12 19:53:10 +09:00
aycabta
53743a42c4 [ruby/irb] Update dependency, reline >= 0.2.7
5a0c8dc9e6
2021-08-12 19:53:04 +09:00
manga_osyo
86e0eecc84 [ruby/irb] Fix #256
Support int that follow on symbeg in IRB

90cb27b1bd
2021-07-23 03:13:14 +09:00
aycabta
261dca2ee2 [ruby/irb] Support non-English code page message
e7d71fea46
2021-07-20 20:36:19 +09:00
aycabta
f1035248af [ruby/irb] Show code page by irb_info on Windows
6160d74199
2021-07-16 01:55:25 +09:00
aycabta
1d03c7da04 [ruby/irb] Add an explanation of default sub commands of "measure", which are :time and :stackprof
759be5a344
2021-07-13 21:21:29 +09:00
aycabta
947d0198e0 [ruby/irb] Show LANG and LC_ALL env by irb_info
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>

b431742430
2021-07-11 06:12:07 +09:00
Jeremy Evans
289fd3c801 [ruby/irb] Pass local variables from workspace binding to lexer
This fixes at least an issue where irb will incorrectly assume
code opens a heredoc when it does not, such as this code:

```ruby
s1 = 'testing'
s2 = 'this'
s2 <<s1
p s1
s1
```

Ruby parses the `s2 <<s1` as `s2.<<(s1)`, not as a heredoc, because
`s2` is a local variable in scope.  irb was using ripper without
letting ripper know that `s2` was a local variable, so ripper would
lex it as a heredoc instead of a method call.

Fix the situation by prepending a line at line 0 with all local
variable definitions in scope whenever lexing.  This fixes the
heredoc issue, and potentially other issues that depend on whether
an identifier is a local variable or not.

Fixes [Bug #17530]

4ed2187f76
2021-07-10 13:44:17 +09:00
Keiko Kaneko
8ee24840c8 [ruby/irb] Update ls.rb without requiring Set, because Set is one of standard libraries
7092ad2ab5
2021-07-01 05:16:31 +09:00
Takashi Kokubun
acbddbe68c [ruby/irb] Rescue a specific error
Rescuing StandardError is prone to bugs caused by a typo or obsoleted methods.

eb5260fcd5
2021-06-30 21:06:52 +09:00
Masataka Pocke Kuwabara
e8c2b03ee1 [ruby/irb] Fix error on ls object_cant_define_singleton
such as `ls 42`, `ls :sym` and so on

b1d436a853
2021-06-30 20:55:18 +09:00
Takashi Kokubun
35c7e83bb3 [ruby/irb] Optimize show_source command further
https://github.com/ruby/irb/pull/249 actually slowed down how `code` is
concatenated. The original way of creating `code` is faster.

[before]
    user     system      total        real
2.420137   0.005364   2.425501 (  2.426264)

[after]
    user     system      total        real
1.000221   0.007454   1.007675 (  1.008295)

Theoretically, this implementation might skip lines that don't appear in
Ripper tokens, but this assumes such lines don't impact whether the code
passes compilation or not. At least normal blank lines seem to have an
`on_ignored_nl` token anyway though.

27dd2867cd
2021-06-27 10:52:49 +09:00
Masataka Pocke Kuwabara
6eb7c663c6 [ruby/irb] Improve performance of show_source for large class
2b79e9ad21
2021-06-27 10:36:11 +09:00
Keiko Kaneko
de779f4a62 [ruby/irb] Sort ls result ordered by anscestry
fdd5c0a71e
2021-06-22 22:32:42 +09:00
Ulysse Buonomo
5cc11845b2 [ruby/irb] Improve stackprof measure
Allow usage of more detailed args when setting stackprof callback.

Signed-off-by: Ulysse Buonomo <buonomo.ulysse@gmail.com>

c9d101f450
2021-06-21 18:03:49 +09:00
aycabta
c2f30aaade [ruby/irb] Version 1.3.6
75aa8d159b
2021-06-21 17:35:46 +09:00
Mark Delk
b8ffb1c46f [ruby/irb] respect NO_COLOR environment variable
When `NO_COLOR` is set to any non-nil value, output is not colorized.

See https://no-color.org/

401d0916fe
2021-05-24 11:55:58 +09:00
aycabta
eef406acf4 [ruby/irb] IRB should use the latest Reline, 0.2.5
34496e20e8
2021-05-15 19:12:57 +09:00
Masataka Pocke Kuwabara
de96ae9b71 [ruby/irb] Dump ancestors' methods by ls command
73edff287c
2021-05-08 14:00:40 +09:00